Soenneker.Extensions.Enumerable 2.1.157

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Extensions.Enumerable --version 2.1.157                
NuGet\Install-Package Soenneker.Extensions.Enumerable -Version 2.1.157                
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.157" />                
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.157                
#r "nuget: Soenneker.Extensions.Enumerable, 2.1.157"                
#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.157

// Install Soenneker.Extensions.Enumerable as a Cake Tool
#tool nuget:?package=Soenneker.Extensions.Enumerable&version=2.1.157                

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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 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.

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.Extensions.Enumerable.String

A collection of helpful enumerable string extension methods

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.163 0 9/27/2024
2.1.162 0 9/27/2024
2.1.161 114 9/26/2024
2.1.160 1,936 9/26/2024
2.1.159 2,835 9/26/2024
2.1.158 3,819 9/23/2024
2.1.157 2,517 9/23/2024
2.1.156 1,559 9/23/2024
2.1.155 1,601 9/23/2024
2.1.154 5,327 9/23/2024
2.1.153 610 9/23/2024
2.1.152 749 9/23/2024
2.1.151 57 9/23/2024
2.1.150 2,073 9/23/2024
2.1.149 10,280 9/17/2024
2.1.148 63 9/17/2024
2.1.147 361 9/17/2024
2.1.146 4,183 9/17/2024
2.1.145 3,757 9/17/2024
2.1.144 4,851 9/17/2024
2.1.143 74 9/17/2024
2.1.142 444 9/17/2024
2.1.141 1,076 9/17/2024
2.1.140 11,051 9/16/2024
2.1.139 6,701 9/12/2024
2.1.138 4,636 9/11/2024
2.1.137 2,738 9/11/2024
2.1.136 5,450 9/11/2024
2.1.135 4,466 9/11/2024
2.1.134 10,106 9/10/2024
2.1.133 2,062 9/10/2024
2.1.132 3,399 9/9/2024
2.1.131 3,717 9/9/2024
2.1.130 2,468 9/9/2024
2.1.129 1,124 9/9/2024
2.1.128 65 9/9/2024
2.1.127 73 9/9/2024
2.1.126 61 9/9/2024
2.1.125 15,375 9/6/2024
2.1.124 5,941 9/6/2024
2.1.123 3,042 9/5/2024
2.1.122 1,867 9/5/2024
2.1.121 3,703 9/5/2024
2.1.120 2,021 9/5/2024
2.1.119 62 9/5/2024
2.1.118 1,446 9/5/2024
2.1.117 5,457 9/5/2024
2.1.116 1,271 9/4/2024
2.1.115 10,993 9/3/2024
2.1.114 1,076 9/3/2024
2.1.113 4,501 9/3/2024
2.1.112 8,730 8/29/2024
2.1.111 6,117 8/26/2024
2.1.110 6,113 8/21/2024
2.1.109 3,405 8/21/2024
2.1.108 357 8/20/2024
2.1.107 4,239 8/20/2024
2.1.106 79 8/20/2024
2.1.105 4,323 8/20/2024
2.1.104 2,629 8/20/2024
2.1.103 8,256 8/15/2024
2.1.102 7,406 8/13/2024
2.1.101 7,044 8/6/2024
2.1.100 8,272 8/1/2024
2.1.99 497 8/1/2024
2.1.98 7,705 7/25/2024
2.1.97 918 7/25/2024
2.1.96 844 7/25/2024
2.1.95 559 7/24/2024
2.1.94 185 7/24/2024
2.1.93 7,941 7/20/2024
2.1.92 7,472 7/14/2024
2.1.91 2,030 7/14/2024
2.1.90 6,145 7/10/2024
2.1.89 187 7/10/2024
2.1.88 1,864 7/10/2024
2.1.87 1,870 7/10/2024
2.1.86 177 7/10/2024
2.1.85 180 7/10/2024
2.1.83 1,916 7/10/2024
2.1.82 3,000 7/9/2024
2.1.80 750 7/9/2024
2.1.79 1,209 7/9/2024
2.1.78 7,080 7/9/2024
2.1.77 2,776 7/9/2024
2.1.76 4,643 7/9/2024
2.1.75 93 7/9/2024
2.1.74 111 7/8/2024
2.1.73 91 7/8/2024
2.1.72 2,281 7/8/2024
2.1.71 78 7/8/2024
2.1.70 6,227 7/8/2024
2.1.69 1,952 7/7/2024
2.1.68 2,326 7/7/2024
2.1.67 584 7/7/2024
2.1.66 1,207 7/7/2024
2.1.65 2,731 7/7/2024
2.1.64 2,390 7/7/2024
2.1.63 92 7/7/2024
2.1.62 3,302 7/5/2024
2.1.61 65,975 5/25/2024
2.1.60 92 5/25/2024
2.1.59 470 5/25/2024
2.1.58 12,688 5/22/2024
2.1.57 97 5/22/2024
2.1.56 10,449 5/17/2024
2.1.55 14,364 4/30/2024
2.1.54 14,272 4/28/2024
2.1.53 93 4/28/2024
2.1.52 634 4/27/2024
2.1.51 92 4/27/2024
2.1.50 22,719 4/12/2024
2.1.49 1,252 4/12/2024
2.1.48 101 4/12/2024
2.1.47 33,164 3/18/2024
2.1.46 8,056 3/13/2024
2.1.45 2,038 3/13/2024
2.1.44 56,416 2/21/2024
2.1.43 2,582 2/21/2024
2.1.42 100 2/21/2024
2.1.41 20,252 2/16/2024
2.1.40 598 2/16/2024
2.1.39 22,280 2/9/2024
2.1.38 17,542 2/6/2024
2.1.37 101 2/6/2024
2.1.36 58,941 1/15/2024
2.1.35 774 1/15/2024
2.1.34 24,774 1/5/2024
2.1.33 2,290 1/5/2024
2.1.32 12,576 12/27/2023
2.1.31 1,275 12/27/2023
2.1.30 1,015 12/27/2023
2.1.29 7,360 12/25/2023
2.1.28 1,291 12/25/2023
2.1.27 649 12/25/2023
2.1.26 9,918 12/23/2023
2.1.25 117 12/23/2023
2.1.24 753 12/23/2023
2.1.23 19,501 12/9/2023
2.1.22 1,268 12/9/2023
2.1.21 215 12/9/2023
2.1.20 1,790 12/9/2023
2.1.19 10,273 12/4/2023
2.1.18 761 12/4/2023
2.1.17 5,101 11/26/2023
2.1.16 5,089 11/23/2023
2.1.15 317 11/23/2023
2.1.14 836 11/23/2023
2.1.13 8,810 11/19/2023
2.1.12 125 11/19/2023
2.1.11 1,043 11/18/2023
2.1.10 3,200 11/18/2023
2.1.9 1,805 11/18/2023
2.1.8 3,435 11/17/2023
2.1.7 1,041 11/17/2023
2.1.6 1,511 11/17/2023
2.1.5 753 11/17/2023
2.1.4 564 11/16/2023
2.1.3 147 11/16/2023
2.0.52 1,163 11/15/2023
2.0.51 1,981 11/15/2023
2.0.2 122 11/16/2023
2.0.1 129 11/16/2023
1.0.50 3,891 11/11/2023
1.0.49 112 11/11/2023
1.0.48 97 11/11/2023
1.0.47 1,251 11/9/2023
1.0.46 118 11/9/2023
1.0.45 4,911 11/6/2023
1.0.44 2,143 11/3/2023
1.0.43 1,716 11/2/2023
1.0.42 1,771 11/1/2023
1.0.41 7,039 10/18/2023
1.0.40 2,863 10/17/2023
1.0.39 1,137 10/16/2023
1.0.38 2,548 10/13/2023
1.0.37 143 10/13/2023
1.0.36 5,807 9/19/2023
1.0.35 1,913 9/18/2023
1.0.34 120 9/18/2023
1.0.33 7,332 8/30/2023
1.0.32 2,559 8/29/2023
1.0.31 3,847 8/24/2023
1.0.30 135 8/24/2023
1.0.29 4,184 8/17/2023
1.0.28 147 8/17/2023
1.0.27 7,744 8/7/2023
1.0.26 154 8/7/2023
1.0.25 7,515 7/10/2023
1.0.24 9,599 7/7/2023
1.0.23 153 7/7/2023
1.0.22 8,898 6/28/2023
1.0.21 42,489 5/24/2023
1.0.20 1,063 5/24/2023
1.0.19 363 5/23/2023
1.0.18 174 5/31/2023
1.0.17 2,647 5/23/2023
1.0.16 2,837 5/22/2023
1.0.15 5,634 5/17/2023
1.0.14 158 5/17/2023
1.0.13 5,327 4/28/2023
1.0.12 2,064 4/24/2023
1.0.11 888 4/21/2023
1.0.10 4,154 4/12/2023
1.0.9 992 4/11/2023
1.0.8 1,881 4/3/2023
1.0.7 218 4/3/2023
1.0.6 339 4/1/2023
1.0.5 1,934 3/23/2023
1.0.3 516 2/28/2023
1.0.2 406 2/16/2023