1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-09 23:45:42 +00:00

Move LINQ-inspired methods to child namespaces (#7)

This commit is contained in:
Oliver Booth 2022-04-21 22:27:24 +01:00
parent 5fca0f8106
commit 4096265006
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
20 changed files with 55 additions and 20 deletions

View File

@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using X10D.Linq;
namespace X10D.Tests.Core; namespace X10D.Tests.Core;

View File

@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using X10D.Linq;
namespace X10D.Tests.Core; namespace X10D.Tests.Core;

View File

@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using X10D.Linq;
namespace X10D.Tests.Core; namespace X10D.Tests.Core;

View File

@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using X10D.Linq;
namespace X10D.Tests.Core; namespace X10D.Tests.Core;

View File

@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using X10D.Linq;
namespace X10D.Tests.Core; namespace X10D.Tests.Core;

View File

@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using X10D.Linq;
namespace X10D.Tests.Core; namespace X10D.Tests.Core;

View File

@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using X10D.Linq;
namespace X10D.Tests.Core; namespace X10D.Tests.Core;

View File

@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using X10D.Linq;
namespace X10D.Tests.Core; namespace X10D.Tests.Core;

View File

@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using X10D.Linq;
namespace X10D.Tests.Core; namespace X10D.Tests.Core;

View File

@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using X10D.Linq;
namespace X10D.Tests.Core; namespace X10D.Tests.Core;

View File

@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using X10D.Linq;
namespace X10D.Tests.Core; namespace X10D.Tests.Core;

View File

@ -1,4 +1,4 @@
namespace X10D; namespace X10D.Collections;
/// <summary> /// <summary>
/// Extension methods for <see cref="IEnumerable{T}" />. /// Extension methods for <see cref="IEnumerable{T}" />.

View File

@ -1,4 +1,4 @@
namespace X10D; namespace X10D.Collections;
/// <summary> /// <summary>
/// Extension methods for <see cref="IList{T}" /> and <see cref="IReadOnlyList{T}" />. /// Extension methods for <see cref="IList{T}" /> and <see cref="IReadOnlyList{T}" />.

View File

@ -1,6 +1,9 @@
namespace X10D; namespace X10D.Linq;
public static partial class EnumerableExtensions /// <summary>
/// LINQ-inspired extension methods for <see cref="IEnumerable{T}" /> of <see cref="byte" />.
/// </summary>
public static class ByteExtensions
{ {
/// <summary> /// <summary>
/// Computes the product of a sequence of <see cref="byte" /> values. /// Computes the product of a sequence of <see cref="byte" /> values.
@ -9,8 +12,9 @@ public static partial class EnumerableExtensions
/// <returns>The product the values in the sequence.</returns> /// <returns>The product the values in the sequence.</returns>
public static byte Product(this IEnumerable<byte> source) public static byte Product(this IEnumerable<byte> source)
{ {
return source.Aggregate((byte)1, (current, value) => (byte) (current * value)); return source.Aggregate((byte)1, (current, value) => (byte)(current * value));
} }
/// <summary> /// <summary>
/// Computes the product of a sequence of <see cref="sbyte" /> values. /// Computes the product of a sequence of <see cref="sbyte" /> values.
/// </summary> /// </summary>
@ -19,7 +23,7 @@ public static partial class EnumerableExtensions
[CLSCompliant(false)] [CLSCompliant(false)]
public static sbyte Product(this IEnumerable<sbyte> source) public static sbyte Product(this IEnumerable<sbyte> source)
{ {
return source.Aggregate((sbyte)1, (current, value) => (sbyte) (current * value)); return source.Aggregate((sbyte)1, (current, value) => (sbyte)(current * value));
} }
/// <summary> /// <summary>

View File

@ -1,6 +1,9 @@
namespace X10D; namespace X10D.Linq;
public static partial class EnumerableExtensions /// <summary>
/// LINQ-inspired extension methods for <see cref="IEnumerable{T}" /> of <see cref="decimal" />.
/// </summary>
public static class DecimalExtensions
{ {
/// <summary> /// <summary>
/// Computes the product of a sequence of <see cref="decimal" /> values. /// Computes the product of a sequence of <see cref="decimal" /> values.

View File

@ -1,6 +1,9 @@
namespace X10D; namespace X10D.Linq;
public static partial class EnumerableExtensions /// <summary>
/// LINQ-inspired extension methods for <see cref="IEnumerable{T}" /> of <see cref="double" />.
/// </summary>
public static class DoubleExtensions
{ {
/// <summary> /// <summary>
/// Computes the product of a sequence of <see cref="double" /> values. /// Computes the product of a sequence of <see cref="double" /> values.

View File

@ -1,6 +1,9 @@
namespace X10D; namespace X10D.Linq;
public static partial class EnumerableExtensions /// <summary>
/// LINQ-inspired extension methods for <see cref="IEnumerable{T}" /> of <see cref="long" />.
/// </summary>
public static class Int16Extensions
{ {
/// <summary> /// <summary>
/// Computes the product of a sequence of <see cref="short" /> values. /// Computes the product of a sequence of <see cref="short" /> values.
@ -9,8 +12,9 @@ public static partial class EnumerableExtensions
/// <returns>The product the values in the sequence.</returns> /// <returns>The product the values in the sequence.</returns>
public static short Product(this IEnumerable<short> source) public static short Product(this IEnumerable<short> source)
{ {
return source.Aggregate((short)1, (current, value) => (short) (current * value)); return source.Aggregate((short)1, (current, value) => (short)(current * value));
} }
/// <summary> /// <summary>
/// Computes the product of a sequence of <see cref="ushort" /> values. /// Computes the product of a sequence of <see cref="ushort" /> values.
/// </summary> /// </summary>
@ -19,7 +23,7 @@ public static partial class EnumerableExtensions
[CLSCompliant(false)] [CLSCompliant(false)]
public static ushort Product(this IEnumerable<ushort> source) public static ushort Product(this IEnumerable<ushort> source)
{ {
return source.Aggregate((ushort)1, (current, value) => (ushort) (current * value)); return source.Aggregate((ushort)1, (current, value) => (ushort)(current * value));
} }
/// <summary> /// <summary>

View File

@ -1,6 +1,9 @@
namespace X10D; namespace X10D.Linq;
public static partial class EnumerableExtensions /// <summary>
/// LINQ-inspired extension methods for <see cref="IEnumerable{T}" /> of <see cref="int" />.
/// </summary>
public static class Int32Extensions
{ {
/// <summary> /// <summary>
/// Computes the product of a sequence of <see cref="int" /> values. /// Computes the product of a sequence of <see cref="int" /> values.

View File

@ -1,6 +1,9 @@
namespace X10D; namespace X10D.Linq;
public static partial class EnumerableExtensions /// <summary>
/// LINQ-inspired extension methods for <see cref="IEnumerable{T}" /> of <see cref="long" />.
/// </summary>
public static class Int64Extensions
{ {
/// <summary> /// <summary>
/// Computes the product of a sequence of <see cref="long" /> values. /// Computes the product of a sequence of <see cref="long" /> values.
@ -11,6 +14,7 @@ public static partial class EnumerableExtensions
{ {
return source.Aggregate(1L, (current, value) => current * value); return source.Aggregate(1L, (current, value) => current * value);
} }
/// <summary> /// <summary>
/// Computes the product of a sequence of <see cref="ulong" /> values. /// Computes the product of a sequence of <see cref="ulong" /> values.
/// </summary> /// </summary>

View File

@ -1,6 +1,9 @@
namespace X10D; namespace X10D.Linq;
public static partial class EnumerableExtensions /// <summary>
/// LINQ-inspired extension methods for <see cref="IEnumerable{T}" /> of <see cref="float" />.
/// </summary>
public static class SingleExtensions
{ {
/// <summary> /// <summary>
/// Computes the product of a sequence of <see cref="float" /> values. /// Computes the product of a sequence of <see cref="float" /> values.