Soenneker.Extensions.Enumerable
2.1.13
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Soenneker.Extensions.Enumerable --version 2.1.13
NuGet\Install-Package Soenneker.Extensions.Enumerable -Version 2.1.13
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.13" />
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.13
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Extensions.Enumerable, 2.1.13"
#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.13 // Install Soenneker.Extensions.Enumerable as a Cake Tool #tool nuget:?package=Soenneker.Extensions.Enumerable&version=2.1.13
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
Install-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 | 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.
-
net8.0
- Soenneker.Utils.Random (>= 2.1.8)
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.Utils.Process
A utility library implementing useful process operations |
|
Soenneker.Swashbuckle.Authentication
A middleware implementing basic authentication and RBAC support for Swashbuckle (Swagger) |
|
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.149 | 2,412 | 9/17/2024 |
2.1.148 | 33 | 9/17/2024 |
2.1.147 | 214 | 9/17/2024 |
2.1.146 | 2,751 | 9/17/2024 |
2.1.145 | 2,629 | 9/17/2024 |
2.1.144 | 3,412 | 9/17/2024 |
2.1.143 | 38 | 9/17/2024 |
2.1.142 | 297 | 9/17/2024 |
2.1.141 | 808 | 9/17/2024 |
2.1.140 | 8,103 | 9/16/2024 |
2.1.139 | 5,521 | 9/12/2024 |
2.1.138 | 3,832 | 9/11/2024 |
2.1.137 | 2,362 | 9/11/2024 |
2.1.136 | 4,609 | 9/11/2024 |
2.1.135 | 3,831 | 9/11/2024 |
2.1.134 | 8,578 | 9/10/2024 |
2.1.133 | 1,778 | 9/10/2024 |
2.1.132 | 2,839 | 9/9/2024 |
2.1.131 | 3,281 | 9/9/2024 |
2.1.130 | 2,131 | 9/9/2024 |
2.1.129 | 948 | 9/9/2024 |
2.1.128 | 64 | 9/9/2024 |
2.1.127 | 63 | 9/9/2024 |
2.1.126 | 60 | 9/9/2024 |
2.1.125 | 12,857 | 9/6/2024 |
2.1.124 | 4,889 | 9/6/2024 |
2.1.123 | 2,535 | 9/5/2024 |
2.1.122 | 1,554 | 9/5/2024 |
2.1.121 | 3,101 | 9/5/2024 |
2.1.120 | 1,702 | 9/5/2024 |
2.1.119 | 61 | 9/5/2024 |
2.1.118 | 1,186 | 9/5/2024 |
2.1.117 | 4,476 | 9/5/2024 |
2.1.116 | 1,059 | 9/4/2024 |
2.1.115 | 9,055 | 9/3/2024 |
2.1.114 | 904 | 9/3/2024 |
2.1.113 | 3,614 | 9/3/2024 |
2.1.112 | 7,036 | 8/29/2024 |
2.1.111 | 4,919 | 8/26/2024 |
2.1.110 | 4,935 | 8/21/2024 |
2.1.109 | 2,767 | 8/21/2024 |
2.1.108 | 304 | 8/20/2024 |
2.1.107 | 3,401 | 8/20/2024 |
2.1.106 | 79 | 8/20/2024 |
2.1.105 | 3,521 | 8/20/2024 |
2.1.104 | 2,171 | 8/20/2024 |
2.1.103 | 6,667 | 8/15/2024 |
2.1.102 | 6,112 | 8/13/2024 |
2.1.101 | 5,803 | 8/6/2024 |
2.1.100 | 6,526 | 8/1/2024 |
2.1.99 | 386 | 8/1/2024 |
2.1.98 | 6,001 | 7/25/2024 |
2.1.97 | 724 | 7/25/2024 |
2.1.96 | 632 | 7/25/2024 |
2.1.95 | 438 | 7/24/2024 |
2.1.94 | 150 | 7/24/2024 |
2.1.93 | 6,252 | 7/20/2024 |
2.1.92 | 6,082 | 7/14/2024 |
2.1.91 | 1,616 | 7/14/2024 |
2.1.90 | 4,925 | 7/10/2024 |
2.1.89 | 167 | 7/10/2024 |
2.1.88 | 1,591 | 7/10/2024 |
2.1.87 | 1,569 | 7/10/2024 |
2.1.86 | 151 | 7/10/2024 |
2.1.85 | 142 | 7/10/2024 |
2.1.83 | 1,523 | 7/10/2024 |
2.1.82 | 2,546 | 7/9/2024 |
2.1.80 | 623 | 7/9/2024 |
2.1.79 | 1,120 | 7/9/2024 |
2.1.78 | 5,655 | 7/9/2024 |
2.1.77 | 2,146 | 7/9/2024 |
2.1.76 | 3,681 | 7/9/2024 |
2.1.75 | 84 | 7/9/2024 |
2.1.74 | 102 | 7/8/2024 |
2.1.73 | 82 | 7/8/2024 |
2.1.72 | 1,834 | 7/8/2024 |
2.1.71 | 78 | 7/8/2024 |
2.1.70 | 5,003 | 7/8/2024 |
2.1.69 | 1,588 | 7/7/2024 |
2.1.68 | 1,826 | 7/7/2024 |
2.1.67 | 503 | 7/7/2024 |
2.1.66 | 942 | 7/7/2024 |
2.1.65 | 2,198 | 7/7/2024 |
2.1.64 | 1,949 | 7/7/2024 |
2.1.63 | 92 | 7/7/2024 |
2.1.62 | 2,588 | 7/5/2024 |
2.1.61 | 52,772 | 5/25/2024 |
2.1.60 | 83 | 5/25/2024 |
2.1.59 | 382 | 5/25/2024 |
2.1.58 | 10,152 | 5/22/2024 |
2.1.57 | 88 | 5/22/2024 |
2.1.56 | 8,352 | 5/17/2024 |
2.1.55 | 11,373 | 4/30/2024 |
2.1.54 | 11,535 | 4/28/2024 |
2.1.53 | 84 | 4/28/2024 |
2.1.52 | 497 | 4/27/2024 |
2.1.51 | 92 | 4/27/2024 |
2.1.50 | 18,406 | 4/12/2024 |
2.1.49 | 1,010 | 4/12/2024 |
2.1.48 | 92 | 4/12/2024 |
2.1.47 | 26,948 | 3/18/2024 |
2.1.46 | 6,608 | 3/13/2024 |
2.1.45 | 1,704 | 3/13/2024 |
2.1.44 | 46,254 | 2/21/2024 |
2.1.43 | 2,099 | 2/21/2024 |
2.1.42 | 91 | 2/21/2024 |
2.1.41 | 16,947 | 2/16/2024 |
2.1.40 | 508 | 2/16/2024 |
2.1.39 | 18,791 | 2/9/2024 |
2.1.38 | 14,846 | 2/6/2024 |
2.1.37 | 92 | 2/6/2024 |
2.1.36 | 50,316 | 1/15/2024 |
2.1.35 | 656 | 1/15/2024 |
2.1.34 | 21,471 | 1/5/2024 |
2.1.33 | 1,998 | 1/5/2024 |
2.1.32 | 10,958 | 12/27/2023 |
2.1.31 | 1,130 | 12/27/2023 |
2.1.30 | 875 | 12/27/2023 |
2.1.29 | 6,278 | 12/25/2023 |
2.1.28 | 1,116 | 12/25/2023 |
2.1.27 | 604 | 12/25/2023 |
2.1.26 | 8,572 | 12/23/2023 |
2.1.25 | 108 | 12/23/2023 |
2.1.24 | 689 | 12/23/2023 |
2.1.23 | 17,005 | 12/9/2023 |
2.1.22 | 1,169 | 12/9/2023 |
2.1.21 | 198 | 12/9/2023 |
2.1.20 | 1,536 | 12/9/2023 |
2.1.19 | 8,900 | 12/4/2023 |
2.1.18 | 693 | 12/4/2023 |
2.1.17 | 4,264 | 11/26/2023 |
2.1.16 | 4,476 | 11/23/2023 |
2.1.15 | 252 | 11/23/2023 |
2.1.14 | 711 | 11/23/2023 |
2.1.13 | 7,572 | 11/19/2023 |
2.1.12 | 116 | 11/19/2023 |
2.1.11 | 915 | 11/18/2023 |
2.1.10 | 2,776 | 11/18/2023 |
2.1.9 | 1,629 | 11/18/2023 |
2.1.8 | 2,984 | 11/17/2023 |
2.1.7 | 964 | 11/17/2023 |
2.1.6 | 1,296 | 11/17/2023 |
2.1.5 | 647 | 11/17/2023 |
2.1.4 | 489 | 11/16/2023 |
2.1.3 | 138 | 11/16/2023 |
2.0.52 | 1,022 | 11/15/2023 |
2.0.51 | 1,401 | 11/15/2023 |
2.0.2 | 113 | 11/16/2023 |
2.0.1 | 120 | 11/16/2023 |
1.0.50 | 3,420 | 11/11/2023 |
1.0.49 | 103 | 11/11/2023 |
1.0.48 | 88 | 11/11/2023 |
1.0.47 | 1,116 | 11/9/2023 |
1.0.46 | 109 | 11/9/2023 |
1.0.45 | 4,319 | 11/6/2023 |
1.0.44 | 1,911 | 11/3/2023 |
1.0.43 | 1,537 | 11/2/2023 |
1.0.42 | 1,520 | 11/1/2023 |
1.0.41 | 6,264 | 10/18/2023 |
1.0.40 | 2,620 | 10/17/2023 |
1.0.39 | 999 | 10/16/2023 |
1.0.38 | 2,298 | 10/13/2023 |
1.0.37 | 134 | 10/13/2023 |
1.0.36 | 5,174 | 9/19/2023 |
1.0.35 | 1,719 | 9/18/2023 |
1.0.34 | 111 | 9/18/2023 |
1.0.33 | 6,539 | 8/30/2023 |
1.0.32 | 2,334 | 8/29/2023 |
1.0.31 | 3,500 | 8/24/2023 |
1.0.30 | 126 | 8/24/2023 |
1.0.29 | 3,932 | 8/17/2023 |
1.0.28 | 138 | 8/17/2023 |
1.0.27 | 7,269 | 8/7/2023 |
1.0.26 | 145 | 8/7/2023 |
1.0.25 | 7,153 | 7/10/2023 |
1.0.24 | 8,040 | 7/7/2023 |
1.0.23 | 144 | 7/7/2023 |
1.0.22 | 8,093 | 6/28/2023 |
1.0.21 | 39,287 | 5/24/2023 |
1.0.20 | 944 | 5/24/2023 |
1.0.19 | 354 | 5/23/2023 |
1.0.18 | 165 | 5/31/2023 |
1.0.17 | 2,497 | 5/23/2023 |
1.0.16 | 2,739 | 5/22/2023 |
1.0.15 | 5,162 | 5/17/2023 |
1.0.14 | 149 | 5/17/2023 |
1.0.13 | 4,930 | 4/28/2023 |
1.0.12 | 1,911 | 4/24/2023 |
1.0.11 | 840 | 4/21/2023 |
1.0.10 | 3,845 | 4/12/2023 |
1.0.9 | 906 | 4/11/2023 |
1.0.8 | 1,703 | 4/3/2023 |
1.0.7 | 209 | 4/3/2023 |
1.0.6 | 316 | 4/1/2023 |
1.0.5 | 1,883 | 3/23/2023 |
1.0.3 | 496 | 2/28/2023 |
1.0.2 | 397 | 2/16/2023 |