Soenneker.Extensions.Enumerable
2.1.61
Prefix Reserved
dotnet add package Soenneker.Extensions.Enumerable --version 2.1.61
NuGet\Install-Package Soenneker.Extensions.Enumerable -Version 2.1.61
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="Soenneker.Extensions.Enumerable" Version="2.1.61" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soenneker.Extensions.Enumerable --version 2.1.61
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Extensions.Enumerable, 2.1.61"
#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 Soenneker.Extensions.Enumerable as a Cake Addin
#addin nuget:?package=Soenneker.Extensions.Enumerable&version=2.1.61
// Install Soenneker.Extensions.Enumerable as a Cake Tool
#tool nuget:?package=Soenneker.Extensions.Enumerable&version=2.1.61
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Soenneker.Extensions.Enumerable
A collection of helpful enumerable extension methods
Installation
dotnet add package Soenneker.Extensions.Enumerable
Usage
IEnumerable
should have IsNullOrEmpty()
too
var populatedList = new List<string>{"foo", "bar", "foo"};
populatedList.IsNullOrEmpty() // false
populatedList.Populated() // true
populatedList.None() // false
One call checking for null and contains any elements
List<string>? nullList = null;
nullList.IsNullOrEmpty() // true
nullList.Populated() // false
Duplicate handling
var containsDuplicates = populatedList.ContainsDuplicates(); // true
var deduped = populatedList.RemoveDuplicates(); // {"foo", "bar"}
Recursive flattening
public class Node
{
public string Name {get; set;}
public List<Node> Children {get; set;}
}
void Example()
{
var node = new Node(){ Name = "Node1" };
node.Children = new List()
{
new Node()
{
Name = "Node2"
}
}
List<Node>? children = node.Children.ToFlattenedFromRecursive(c => c.Children);
// Results in flattened List:
// { Node1, Node2 }
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Soenneker.Utils.Random (>= 2.1.35)
-
net7.0
- Soenneker.Utils.Random (>= 2.1.35)
-
net8.0
- Soenneker.Utils.Random (>= 2.1.35)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on Soenneker.Extensions.Enumerable:
Package | Downloads |
---|---|
Soenneker.Utils.SingletonDictionary
An externally initializing singleton dictionary that uses double-check asynchronous locking, with optional async and sync disposal |
|
Soenneker.Utils.String
A utility library for useful String operations |
|
Soenneker.Swashbuckle.Authentication
A middleware implementing basic authentication and RBAC support for Swashbuckle (Swagger) |
|
Soenneker.Utils.Process
A utility library implementing useful process operations |
|
Soenneker.Utils.Network
A utility library of helpful network related operations |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.1.61 | 42,630 | 5/25/2024 |
2.1.60 | 70 | 5/25/2024 |
2.1.59 | 369 | 5/25/2024 |
2.1.58 | 10,134 | 5/22/2024 |
2.1.57 | 75 | 5/22/2024 |
2.1.56 | 8,330 | 5/17/2024 |
2.1.55 | 11,171 | 4/30/2024 |
2.1.54 | 11,460 | 4/28/2024 |
2.1.53 | 78 | 4/28/2024 |
2.1.52 | 481 | 4/27/2024 |
2.1.51 | 83 | 4/27/2024 |
2.1.50 | 18,343 | 4/12/2024 |
2.1.49 | 988 | 4/12/2024 |
2.1.48 | 77 | 4/12/2024 |
2.1.47 | 26,227 | 3/18/2024 |
2.1.46 | 6,489 | 3/13/2024 |
2.1.45 | 1,664 | 3/13/2024 |
2.1.44 | 45,725 | 2/21/2024 |
2.1.43 | 2,063 | 2/21/2024 |
2.1.42 | 81 | 2/21/2024 |
2.1.41 | 16,669 | 2/16/2024 |
2.1.40 | 484 | 2/16/2024 |
2.1.39 | 18,472 | 2/9/2024 |
2.1.38 | 14,660 | 2/6/2024 |
2.1.37 | 82 | 2/6/2024 |
2.1.36 | 49,778 | 1/15/2024 |
2.1.35 | 636 | 1/15/2024 |
2.1.34 | 21,339 | 1/5/2024 |
2.1.33 | 1,980 | 1/5/2024 |
2.1.32 | 10,870 | 12/27/2023 |
2.1.31 | 1,116 | 12/27/2023 |
2.1.30 | 858 | 12/27/2023 |
2.1.29 | 6,116 | 12/25/2023 |
2.1.28 | 1,095 | 12/25/2023 |
2.1.27 | 593 | 12/25/2023 |
2.1.26 | 8,298 | 12/23/2023 |
2.1.25 | 95 | 12/23/2023 |
2.1.24 | 676 | 12/23/2023 |
2.1.23 | 16,452 | 12/9/2023 |
2.1.22 | 1,155 | 12/9/2023 |
2.1.21 | 185 | 12/9/2023 |
2.1.20 | 1,458 | 12/9/2023 |
2.1.19 | 8,620 | 12/4/2023 |
2.1.18 | 680 | 12/4/2023 |
2.1.17 | 4,052 | 11/26/2023 |
2.1.16 | 4,341 | 11/23/2023 |
2.1.15 | 233 | 11/23/2023 |
2.1.14 | 634 | 11/23/2023 |
2.1.13 | 7,302 | 11/19/2023 |
2.1.12 | 103 | 11/19/2023 |
2.1.11 | 855 | 11/18/2023 |
2.1.10 | 2,685 | 11/18/2023 |
2.1.9 | 1,584 | 11/18/2023 |
2.1.8 | 2,860 | 11/17/2023 |
2.1.7 | 952 | 11/17/2023 |
2.1.6 | 1,222 | 11/17/2023 |
2.1.5 | 566 | 11/17/2023 |
2.1.4 | 476 | 11/16/2023 |
2.1.3 | 119 | 11/16/2023 |
2.0.52 | 962 | 11/15/2023 |
2.0.51 | 1,308 | 11/15/2023 |
2.0.2 | 106 | 11/16/2023 |
2.0.1 | 107 | 11/16/2023 |
1.0.50 | 3,384 | 11/11/2023 |
1.0.49 | 95 | 11/11/2023 |
1.0.48 | 80 | 11/11/2023 |
1.0.47 | 1,101 | 11/9/2023 |
1.0.46 | 101 | 11/9/2023 |
1.0.45 | 4,169 | 11/6/2023 |
1.0.44 | 1,895 | 11/3/2023 |
1.0.43 | 1,525 | 11/2/2023 |
1.0.42 | 1,442 | 11/1/2023 |
1.0.41 | 6,121 | 10/18/2023 |
1.0.40 | 2,572 | 10/17/2023 |
1.0.39 | 947 | 10/16/2023 |
1.0.38 | 2,264 | 10/13/2023 |
1.0.37 | 126 | 10/13/2023 |
1.0.36 | 5,062 | 9/19/2023 |
1.0.35 | 1,656 | 9/18/2023 |
1.0.34 | 99 | 9/18/2023 |
1.0.33 | 6,375 | 8/30/2023 |
1.0.32 | 2,284 | 8/29/2023 |
1.0.31 | 3,493 | 8/24/2023 |
1.0.30 | 121 | 8/24/2023 |
1.0.29 | 3,916 | 8/17/2023 |
1.0.28 | 134 | 8/17/2023 |
1.0.27 | 7,260 | 8/7/2023 |
1.0.26 | 136 | 8/7/2023 |
1.0.25 | 7,118 | 7/10/2023 |
1.0.24 | 7,597 | 7/7/2023 |
1.0.23 | 137 | 7/7/2023 |
1.0.22 | 7,908 | 6/28/2023 |
1.0.21 | 38,854 | 5/24/2023 |
1.0.20 | 938 | 5/24/2023 |
1.0.19 | 347 | 5/23/2023 |
1.0.18 | 155 | 5/31/2023 |
1.0.17 | 2,485 | 5/23/2023 |
1.0.16 | 2,731 | 5/22/2023 |
1.0.15 | 5,151 | 5/17/2023 |
1.0.14 | 144 | 5/17/2023 |
1.0.13 | 4,916 | 4/28/2023 |
1.0.12 | 1,903 | 4/24/2023 |
1.0.11 | 830 | 4/21/2023 |
1.0.10 | 3,836 | 4/12/2023 |
1.0.9 | 897 | 4/11/2023 |
1.0.8 | 1,693 | 4/3/2023 |
1.0.7 | 201 | 4/3/2023 |
1.0.6 | 301 | 4/1/2023 |
1.0.5 | 1,874 | 3/23/2023 |
1.0.3 | 480 | 2/28/2023 |
1.0.2 | 388 | 2/16/2023 |