Skip to content

Releases: thomaslevesque/Linq.Extras

5.0.0

11 Nov 23:22
96a4f4b
Compare
Choose a tag to compare

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 and Max overloads that accept an IComparer<T>
    • MinBy and MaxBy
    • FirstOrDefault, LastOrDefault, and SingleOrDefault 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 new Chunk method does exactly the same thing.

Fixed

  • Ambiguous call for ToHashSet (#19) : was supposedly fixed in 4.1.0, but caused another issue (#22)
  • MissingMethodException caused by using ToHashSet method (#22)
  • Ambiguous call for new methods introduced in .NET 6.0 (#24)

5.0.0-beta.1

23 Jun 21:47
6d4f81a
Compare
Choose a tag to compare
5.0.0-beta.1 Pre-release
Pre-release

Fixed

  • MissingMethodException for ToHashSet (#22). This could also happen with Append and Prepend.

New

  • Added netcoreapp3.1 and net5.0 TFMs

Removed (breaking changes)

  • Removed ToHashSet, Append, Prepend. These methods already exist in recent versions of the framework, offer little benefit, and were causing too much trouble (see #22, #19)
  • Removed obsolete TFMs: netstandard1.0, netstandard1.6, net471, net472, netcoreapp2.0

4.1.0

19 Mar 12:39
f85700f
Compare
Choose a tag to compare

New

  • New TFMs netstandard2.1, netcoreapp2.0 and net472 (in order to fix #19)

Fixed

  • Ambiguous invocation error for calls to ToHashSet if both the System.Linq and Linq.Extras namespaces are imported (#19)

4.0.0

19 Jul 19:55
166384d
Compare
Choose a tag to compare

Fixed

  • [Breaking change] Fix Min/Max with comparer and MinBy/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!

Other

  • Fix some nullability warnings
  • Improve build script (thanks to @adamralph)

4.0.0-beta.1

18 Jul 17:31
166384d
Compare
Choose a tag to compare
4.0.0-beta.1 Pre-release
Pre-release

Breaking change

  • Fix Min/Max with comparer and MinBy/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

3.0.0

30 Nov 16:28
4538269
Compare
Choose a tag to compare

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 and List<T>.

Breaking changes

  • The IIndexedItem<T> interface has been replaced with an ItemWithIndex<T> struct, for performance reasons

2.0.0

07 Dec 11:04
Compare
Choose a tag to compare

New

  • Added strong name
  • Added netstandard1.6 and net471 targets

Removed

  • Removed Append and Prepend 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

2.0.0-alpha.2

06 Dec 16:21
Compare
Choose a tag to compare
2.0.0-alpha.2 Pre-release
Pre-release

Changed

  • Moved release notes to GitHub releases

2.0.0-alpha.1

06 Dec 15:40
Compare
Choose a tag to compare
2.0.0-alpha.1 Pre-release
Pre-release

New

  • Added strong name
  • Added netstandard1.6 and net471 targets

Removed

  • Removed Append and Prepend methods for frameworks that already have it (netcoreapp1.0 and higher, net471 and higher, netstandard1.6 and higher)

Other

1.2.0

06 Dec 15:45
Compare
Choose a tag to compare

New

  • added support for .NET Standard 2.0
  • added support for SourceLink