Skip to content

Commit

Permalink
analizators/s4456
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhorukovAnton committed Dec 28, 2021
1 parent ee79cec commit 28e1c65
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ public static IEnumerable<IEnumerable<TEntry>> MakeParts<TEntry>(this IEnumerabl
if (partLength <= 0)
throw new ArgumentOutOfRangeException("partLength", partLength, "Length must be positive integer");

return MakePartsIterator(collection, partLength);
}

private static IEnumerable<IEnumerable<TEntry>> MakePartsIterator<TEntry>(this IEnumerable<TEntry> collection, int partLength)
{
var part = new List<TEntry>(partLength);

foreach (var entry in collection)
Expand Down

0 comments on commit 28e1c65

Please sign in to comment.