SuperLinq 6.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package SuperLinq --version 6.0.0                
NuGet\Install-Package SuperLinq -Version 6.0.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.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SuperLinq --version 6.0.0                
#r "nuget: SuperLinq, 6.0.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.0.0

// Install SuperLinq as a Cake Tool
#tool nuget:?package=SuperLinq&version=6.0.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 is compatible.  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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.

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 12,008 7/17/2024
6.1.0 5,596 5/24/2024
6.0.1 6,840 4/30/2024
6.0.0 678 4/10/2024
6.0.0-preview.1 103 2/26/2024
5.4.0 13,919 11/27/2023
5.4.0-preview.1 110 11/22/2023
5.3.0 436 11/14/2023
5.2.0 4,848 7/8/2023
5.1.0 4,476 5/26/2023
5.0.0 704 4/28/2023
4.8.0 721 2/21/2023
4.7.0 590 1/30/2023
4.6.0 606 12/24/2022
4.5.0 829 11/28/2022
4.4.0 2,753 10/3/2022
4.3.0 623 9/28/2022
4.2.0 2,414 8/25/2022
4.1.0 566 8/12/2022
4.1.0-preview.2 123 7/25/2022
4.1.0-preview.1 123 7/21/2022
4.0.0 665 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 109 6/15/2022
4.0.0-preview.1 121 6/13/2022
4.0.0-preview.0.16 112 6/13/2022