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:
parent
5fca0f8106
commit
4096265006
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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}" />.
|
@ -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}" />.
|
@ -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>
|
@ -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.
|
@ -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.
|
@ -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>
|
@ -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.
|
@ -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>
|
@ -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.
|
Loading…
Reference in New Issue
Block a user