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:DistinctBy
UnionBy
Min
andMax
overloads that accept anIComparer<T>
MinBy
andMaxBy
FirstOrDefault
,LastOrDefault
, andSingleOrDefault
overloads 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
Batch
method is marked obsolete in the .NET 6.0 TFM, since Linq's newChunk
method does exactly the same thing.
Fixed
5.0.0-beta.1
Fixed
MissingMethodException
forToHashSet
(#22). This could also happen withAppend
andPrepend
.
New
- Added netcoreapp3.1 and net5.0 TFMs
Removed (breaking changes)
4.1.0
4.0.0
Fixed
-
[Breaking change] Fix
Min
/Max
with comparer andMinBy
/MaxBy
to 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
/Max
with comparer andMinBy
/MaxBy
to 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
WithIndex
now 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.6
andnet471
targets
Removed
- Removed
Append
andPrepend
methods for frameworks that already have it (netcoreapp1.0
and higher,net471
and higher,netstandard1.6
and 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.6
andnet471
targets
Removed
- Removed
Append
andPrepend
methods for frameworks that already have it (netcoreapp1.0
and higher,net471
and higher,netstandard1.6
and 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