diff --git a/X10D/src/CollectionExtensions/CollectionExtensions.cs b/X10D/src/CollectionExtensions/CollectionExtensions.cs deleted file mode 100644 index 9a76352..0000000 --- a/X10D/src/CollectionExtensions/CollectionExtensions.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace X10D.CollectionExtensions; - -/// -/// Extension methods for and . -/// -public static class CollectionExtensions -{ - /// - /// Splits into chunks of size . - /// - /// Any type. - /// The collection to split. - /// The maximum length of the nested collection. - /// - /// An containing an of - /// whose lengths are no greater than . - /// - public static IEnumerable> Split(this IReadOnlyCollection value, int chunkSize) - { - if (value is null) - { - throw new ArgumentNullException(nameof(value)); - } - - int count = value.Count; - chunkSize = chunkSize.Clamp(1, count); - - for (var index = 0; index < count / chunkSize; index++) - { - yield return value.Skip(index * chunkSize).Take(chunkSize).ToArray(); - } - } -}