SuperLinq 6.2.0
Prefix Reserveddotnet add package SuperLinq --version 6.2.0
NuGet\Install-Package SuperLinq -Version 6.2.0
<PackageReference Include="SuperLinq" Version="6.2.0" />
paket add SuperLinq --version 6.2.0
#r "nuget: SuperLinq, 6.2.0"
// Install SuperLinq as a Cake Addin #addin nuget:?package=SuperLinq&version=6.2.0 // Install SuperLinq as a Cake Tool #tool nuget:?package=SuperLinq&version=6.2.0
SuperLinq
LINQ to Objects is missing a few desirable features.
This project enhances LINQ to Objects with extra methods, in a manner which keeps to the spirit of LINQ.
SuperLinq is available for download and installation as NuGet packages.
Usage
SuperLinq can be used in one of two ways. The simplest is to just import the
SuperLinq
namespace and all extension methods become instantly available for
you to use on the types they extend (typically some instantiation of
IEnumerable<T>
).
Apart from extension methods, SuperLinq also offers regular static method
that generate (instead of operating on) sequences, like Random
, Sequence
and others.
Migration from MoreLINQ
In most case, migration should be easy:
- Remove the nuget reference to MoreLINQ and add a reference to SuperLinq.
- Replace any
using MoreLinq;
withusing SuperLinq;
- Remove any
using MoreLinq.Extensions.*
This is because SuperLinq has been updated to be side-by-side compatible with .NET Core 3.1 and .NET 5.0/6.0.
Breaking Changes
Framework Support
Support for earlier frameworks has been dropped. The earliest version supported by SuperLinq is .NET Core 3.1.
Acquire
Acquire has been removed. It was used internally to support other operators, but improved data structures have been introduced to better support them.
AwaitQuery/Observable/Experimental Operators
These operators have been removed, as they do not fit the model of the other SuperLinq operators.
Backsert
This method has been obsoleted in favor of a new overload for .Insert()
that
receives an Index
parameter, which covers the same behavior.
CountDown
An additional overload has been added that returns a stream of (TSource item, int? count)
.
FullJoin
This method has been obsoleted in favor of a new method .FullOuterJoin()
, which
has more options and capabilities.
Lag/Lead
Additional overloads have been added for Lag/Lead that return streams of
(TSource cur, TSource lag/lead)
.
LeftJoin
This method has been obsoleted in favor of a new method .LeftOuterJoin()
, which
has more options and capabilities.
OrderedMerge
This method has been obsoleted in favor of a new method .FullOuterJoin()
, which
has more options and capabilities.
Pairwise
Pairwise has been removed as it overlaps behavior with both .Lag()
and .Window()
PartialSort
The sorting behavior of .PartialSort()
has been changed slightly, as it now uses
a stable sorting algorithm. This means that items that have the same value (or key)
will return in the same order that they were originally encountered in the stream.
This is a minor change from old sorting behavior.
Rank
The behavior and return type of Rank has been updated:
- Previously, Rank would rank according the highest value by default, opposite to the sorting.
- Now, Rank ranks according to the lowest value, matching the sorting
- Previously, Rank would return a simple list of integers matching the original items
- Now, Rank returns a sorted list of items with their rank
- Previously, Rank would rank each group with a sequential rank value
- Now, Rank ranks each group according to how many total items have been encountered in the stream thus far.
- DenseRank will rank each group with a seqential value.
All of these changes are made to bring Rank/DenseRank with the behavior expressed for Rank/DenseRank in SQL systems (Sql Server, PostgreSQL, etc.)
RightJoin
This method has been obsoleted in favor of a new method .RightOuterJoin()
, which
has more options and capabilities.
RunLengthEncode
The return type has been changed from a stream of KeyValuePair<T, int>
to a stream of (T value, int count)
.NET Versions
Base library is supported on .NET Core 3.1 and .NET 5.0+.
Documentation
Detailed documentation on the operators is available here.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Memory (>= 4.5.5)
-
.NETStandard 2.0
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Memory (>= 4.5.5)
-
net6.0
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Memory (>= 4.5.5)
-
net8.0
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Memory (>= 4.5.5)
-
net9.0
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Memory (>= 4.5.5)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on SuperLinq:
Package | Downloads |
---|---|
SuperLinq.Async
This project enhances Async LINQ to Objects with the following methods: AggregateRight, AssertCount, AtLeast, AtMost, Choose, CollectionEqual, CompareCount, ConcurrentMerge, Consume, CountBetween, CountBy, CountDown, DenseRank, DenseRankBy, DistinctBy, ElementAt, EndsWith, Exactly, ExceptBy, FallbackIfEmpty, FillBackward, FillForward, Fold, From, Generate, GroupAdjacent, Index, IndexBy, Insert, Interleave, OrderBy, Pad, PadStart, PartialSort, PartialSortBy, Random, Rank, RankBy, RunLengthEncode, ScanBy, ScanRight, Segment, Sequence, SkipUntil, SortedMerge, Split, StartsWith, TagFirstLast, Take, TakeEvery, TakeUntil, ThenBy, Where, Window, WindowLeft, WindowRight, ZipLongest, ZipMap, ZipShortest |
|
Hussy.Net
A minified dialect of .NET languages designed with code golf in mind. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on SuperLinq:
Repository | Stars |
---|---|
recyclarr/recyclarr
Automatically sync TRaSH Guides to your Sonarr and Radarr instances
|
Version | Downloads | Last updated |
---|---|---|
6.2.0 | 9,765 | 7/17/2024 |
6.1.0 | 5,573 | 5/24/2024 |
6.0.1 | 6,835 | 4/30/2024 |
6.0.0 | 672 | 4/10/2024 |
6.0.0-preview.1 | 97 | 2/26/2024 |
5.4.0 | 13,902 | 11/27/2023 |
5.4.0-preview.1 | 102 | 11/22/2023 |
5.3.0 | 430 | 11/14/2023 |
5.2.0 | 4,830 | 7/8/2023 |
5.1.0 | 4,288 | 5/26/2023 |
5.0.0 | 671 | 4/28/2023 |
4.8.0 | 715 | 2/21/2023 |
4.7.0 | 583 | 1/30/2023 |
4.6.0 | 599 | 12/24/2022 |
4.5.0 | 825 | 11/28/2022 |
4.4.0 | 2,703 | 10/3/2022 |
4.3.0 | 619 | 9/28/2022 |
4.2.0 | 2,410 | 8/25/2022 |
4.1.0 | 563 | 8/12/2022 |
4.1.0-preview.2 | 119 | 7/25/2022 |
4.1.0-preview.1 | 117 | 7/21/2022 |
4.0.0 | 661 | 7/20/2022 |
4.0.0-preview.7 | 129 | 7/9/2022 |
4.0.0-preview.6 | 189 | 7/4/2022 |
4.0.0-preview.5 | 119 | 6/28/2022 |
4.0.0-preview.4 | 122 | 6/20/2022 |
4.0.0-preview.3 | 100 | 6/20/2022 |
4.0.0-preview.2 | 106 | 6/15/2022 |
4.0.0-preview.1 | 117 | 6/13/2022 |
4.0.0-preview.0.16 | 108 | 6/13/2022 |