4.0.0
What's New 📣
This release introduces an version of that allows use of an array pool for batches, which can especially help reduce (potentially LOH) allocations for very large batch sizes.
Unclaimed project
Are you a maintainer of MoreLINQ? Claim this project to take control of your public changelog and roadmap.
Changelog
Extensions to LINQ to Objects
This release introduces an version of that allows use of an array pool for batches, which can especially help reduce (potentially LOH) allocations for very large batch sizes.
BatchNew aliases are introduced for the following existing methods because they conflicted with identically named methods introduced in .NET 6.0, but which differ in definition and behaviour:
The superseded methods have been marked obsolete and will most probably be removed in a future version. For more details, see #1018.
In a similar vein, this release also retires the following extension methods that are now part of .NET proper and which have identical names and behaviour:
AppendBatchConcatDistinctByPrependSkipLastTakeLastToHashSetThis helps to prevent ambiguity errors during compilation when System.Linq and MoreLinq namespaces are imported together in a file or a namespace. The retirement is done such that the above methods appear as regular static methods rather than extension methods depending on the compilation target. This helps to maintain source as well as binary compatibility. Special thanks to @viceroypenguin for helping with this (see #945 for more details). The upshot is that projects that prefer to import the MoreLinq namespace rather than individual extensions can simply do so without running into ambiguity compilation errors. However, do bear in mind that this does not prevent future conflicts from appearing should more of MoreLINQ's methods find their way into .NET.
Since this a major release, some source and binary breaking changes that are listed below were introduced. Please read the details to see if you're affected.
Interleave shouldn't validate otherSequences members https://github.com/morelinq/MoreLINQ/issues/1029Minima & Maxima to supersede MinBy & MaxBy https://github.com/morelinq/MoreLINQ/issues/1018Windowed that's been obsolete since 3.0 https://github.com/morelinq/MoreLINQ/issues/1016Concat that's been obsolete since 3.0 https://github.com/morelinq/MoreLINQ/issues/993ToDataTable cannot be null https://github.com/morelinq/MoreLINQ/issues/802Subsets(0) should return an empty set https://github.com/morelinq/MoreLINQ/issues/645Batch should return IEnumerable<T[]> https://github.com/morelinq/MoreLINQ/issues/98Concat method by @pflajszer in https://github.com/morelinq/MoreLINQ/pull/1002FillForward when filler is null by @atifaziz in https://github.com/morelinq/MoreLINQ/pull/1006ToDataTable paths by @atifaziz in https://github.com/morelinq/MoreLINQ/pull/1007ToDataTable implementation by @atifaziz in https://github.com/morelinq/MoreLINQ/pull/1008SortedMerge: Test do not call MoveNext eagerly by @Orace in https://github.com/morelinq/MoreLINQ/pull/735EnableGenerateDocumentationFile warning as workaround for IDE0005 by @atifaziz in https://github.com/morelinq/MoreLINQ/pull/1013Batch to return arrays by @atifaziz in https://github.com/morelinq/MoreLINQ/pull/1014Subsets so it returns an empty set when k = 0 by @Orace in https://github.com/morelinq/MoreLINQ/pull/646Windowed that's superseded by Window by @atifaziz in https://github.com/morelinq/MoreLINQ/pull/1017expressions argument of ToDataTable by @atifaziz in https://github.com/morelinq/MoreLINQ/pull/1021Minima & Maxima as successors to MinBy & MaxBy by @atifaziz in https://github.com/morelinq/MoreLINQ/pull/1019otherSequences argument of Interleave by @atifaziz in https://github.com/morelinq/MoreLINQ/pull/1031Pad/PadStart width is invalid by @atifaziz in https://github.com/morelinq/MoreLINQ/pull/1030