Releases: thomaslevesque/Linq.Extras
5.0.0
New
-
New TFM for .NET 6.0.
The following methods that existed in Linq.Extras have been added to Linq in .NET 6.0:DistinctByUnionByMinandMaxoverloads that accept anIComparer<T>MinByandMaxByFirstOrDefault,LastOrDefault, andSingleOrDefaultoverloads that accept an explicit default value
This would cause conflicts if both System.Linq and Linq.Extras namespaces are imported. In the new .NET 6.0 TFM, these methods are no longer extension methods, so they don't cause conflicts, but are still callable at runtime (e.g. in case of indirect dependencies between project that end up using these methods). They're also marked obsolete in the new TFM.
In addition, the
Batchmethod is marked obsolete in the .NET 6.0 TFM, since Linq's newChunkmethod does exactly the same thing.
Fixed
5.0.0-beta.1
Fixed
MissingMethodExceptionforToHashSet(#22). This could also happen withAppendandPrepend.
New
- Added netcoreapp3.1 and net5.0 TFMs
Removed (breaking changes)
4.1.0
4.0.0
Fixed
-
[Breaking change] Fix
Min/Maxwith comparer andMinBy/MaxByto match the Linq behavior with regard to null values, and add nullability attribute to reflect the change (#17). The changes are as follows:- If the sequence is empty and the item type is a reference type or nullable value type, it will return null instead of throwing an exception (same as Linq's
Min<TSource>/Max<TSource) - Null values are ignored when looking for a min/max value, unless all values in the sequence are null
Thanks to @sid-6581 for reporting the issue!
- If the sequence is empty and the item type is a reference type or nullable value type, it will return null instead of throwing an exception (same as Linq's
Other
- Fix some nullability warnings
- Improve build script (thanks to @adamralph)
4.0.0-beta.1
Breaking change
- Fix
Min/Maxwith comparer andMinBy/MaxByto match the Linq behavior with regard to null values, and add nullability attribute to reflect the change (#17). The changes are as follows:- If the sequence is empty and the item type is a reference type or nullable value type, it will return null instead of throwing an exception (same as Linq's
Min<TSource>/Max<TSource) - Null values are ignored when looking for a min/max value, unless all values in the sequence are null
- If the sequence is empty and the item type is a reference type or nullable value type, it will return null instead of throwing an exception (same as Linq's
3.0.0
New
- Enabled C# 8 nullability analysis and annotations
- The type returned by
WithIndexnow has a deconstructor, allowing this kind of usage:foreach (var (item, index) in collection.WithIndex()) { ... }
- Improved performance of
WithIndex, with specific overloads for array andList<T>.
Breaking changes
- The
IIndexedItem<T>interface has been replaced with anItemWithIndex<T>struct, for performance reasons
2.0.0
New
- Added strong name
- Added
netstandard1.6andnet471targets
Removed
- Removed
AppendandPrependmethods for frameworks that already have it (netcoreapp1.0and higher,net471and higher,netstandard1.6and higher)
Changed
- Moved release notes to GitHub releases
Other
- Dropped Cake in favor of a custom build script based on csproj, Bullseye and SimpleExec
- Switched to MinVer to handle versioning
2.0.0-alpha.2
Changed
- Moved release notes to GitHub releases
2.0.0-alpha.1
New
- Added strong name
- Added
netstandard1.6andnet471targets
Removed
- Removed
AppendandPrependmethods for frameworks that already have it (netcoreapp1.0and higher,net471and higher,netstandard1.6and higher)
Other
- Dropped Cake in favor of a custom build script based on csproj, Bullseye and SimpleExec
- Switched to MinVer to handle versioning
1.2.0
New
- added support for .NET Standard 2.0
- added support for SourceLink