Skip to main content
.NETCoreApp3.1net5.0net6.0

This project enhances Async LINQ to Objects with the following methods: AtLeast, AtMost, CompareCount, Consume, CountBy, Exactly, From, Insert, Random, SkipUntil, TakeUntil

Published
Jun 20, 2022
4y ago
Total Downloads
168.1K
168,142

Install

dotnet add package SuperLinq.Async --version 4.0.0-preview.4
ProductVersions
.NET
net5.0net6.0
Other
.NETCoreApp3.1

README

SuperLinq.Async

Async LINQ to Objects is missing a few desirable features.

This project enhances Async LINQ to Objects with extra methods, in a manner which keeps to the spirit of LINQ.

SuperLinq.Async is available for download and installation as a NuGet package.

Usage

SuperLinq.Async can be used in one of two ways. The simplest is to just import the SuperLinq.Async namespace and all extension methods become instantly available for you to use on the types they extend (typically some instantiation of IAsyncEnumerable<T>).

Apart from extension methods, SuperLinq.Async also offers regular static method that generate (instead of operating on) sequences, like Unfold, Random, Sequence and others.

.NET Versions

Base library is supported on .NET Core 3.1 and .NET 5.0+.

Operators

AtLeast

Determines whether or not the number of elements in the sequence is greater than or equal to the given integer.

AtMost

Determines whether or not the number of elements in the sequence is lesser than or equal to the given integer.

CompareCount

Compares two sequences and returns an integer that indicates whether the first sequence has fewer, the same or more elements than the second sequence.

Consume

Completely consumes the given sequence. This method does not store any data during execution

CountBy

Applies a key-generating function to each element of a sequence and returns a sequence of unique keys and their number of occurrences in the original sequence.

This method has 2 overloads.

Exactly

Determines whether or not the number of elements in the sequence is equals to the given integer.

From

Returns a sequence containing the values resulting from invoking (in order) each function in the source sequence of functions.

This method has 4 overloads.

Insert

Inserts the elements of a sequence into another sequence at a specified index.

Random

Returns an infinite sequence of random integers using the standard .NET random number generator.

This method has 6 overloads.

SkipUntil

Skips items from the input sequence until the given predicate returns true when applied to the current source item; that item will be the last skipped

TakeUntil

Returns items from the input sequence until the given predicate returns true when applied to the current source item; that item will be the last returned

Changes from Previous Version

No structural changes between v4.0.0-preview.2.5 and v4.0.0-preview.4.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.