SuperLinq 6.2.0

Prefix Reserved
dotnet add package SuperLinq --version 6.2.0                
NuGet\Install-Package SuperLinq -Version 6.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SuperLinq" Version="6.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SuperLinq --version 6.2.0                
#r "nuget: SuperLinq, 6.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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:

  1. Remove the nuget reference to MoreLINQ and add a reference to SuperLinq.
  2. Replace any using MoreLinq; with using SuperLinq;
  3. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 16,931 7/17/2024
6.1.0 5,655 5/24/2024
6.0.1 6,843 4/30/2024
6.0.0 682 4/10/2024
6.0.0-preview.1 104 2/26/2024
5.4.0 13,963 11/27/2023
5.4.0-preview.1 110 11/22/2023
5.3.0 438 11/14/2023
5.2.0 4,860 7/8/2023
5.1.0 4,863 5/26/2023
5.0.0 777 4/28/2023
4.8.0 723 2/21/2023
4.7.0 592 1/30/2023
4.6.0 611 12/24/2022
4.5.0 832 11/28/2022
4.4.0 2,822 10/3/2022
4.3.0 625 9/28/2022
4.2.0 2,431 8/25/2022
4.1.0 569 8/12/2022
4.1.0-preview.2 123 7/25/2022
4.1.0-preview.1 123 7/21/2022
4.0.0 678 7/20/2022
4.0.0-preview.7 133 7/9/2022
4.0.0-preview.6 193 7/4/2022
4.0.0-preview.5 123 6/28/2022
4.0.0-preview.4 128 6/20/2022
4.0.0-preview.3 106 6/20/2022
4.0.0-preview.2 110 6/15/2022
4.0.0-preview.1 121 6/13/2022
4.0.0-preview.0.16 112 6/13/2022