Soenneker.Extensions.Enumerable 2.1.55

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package Soenneker.Extensions.Enumerable --version 2.1.55
NuGet\Install-Package Soenneker.Extensions.Enumerable -Version 2.1.55
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.55" />
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.55
#r "nuget: Soenneker.Extensions.Enumerable, 2.1.55"
#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.55

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

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 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

An externally initializing singleton dictionary that uses double-check asynchronous locking, with optional async and sync disposal

Soenneker.Utils.Network The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

A utility library of helpful network related operations

Soenneker.Utils.String The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

A utility library for useful String operations

Soenneker.Swashbuckle.Authentication The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

A middleware implementing basic authentication and RBAC support for Swashbuckle (Swagger)

Soenneker.Utils.Process The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

A utility library implementing useful process operations

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.55 656 4/30/2024
2.1.54 10,916 4/28/2024
2.1.53 68 4/28/2024
2.1.52 473 4/27/2024
2.1.51 75 4/27/2024
2.1.50 18,317 4/12/2024
2.1.49 983 4/12/2024
2.1.48 72 4/12/2024
2.1.47 26,121 3/18/2024
2.1.46 6,476 3/13/2024
2.1.45 1,660 3/13/2024
2.1.44 45,683 2/21/2024
2.1.43 2,053 2/21/2024
2.1.42 77 2/21/2024
2.1.41 16,638 2/16/2024
2.1.40 476 2/16/2024
2.1.39 18,457 2/9/2024
2.1.38 14,639 2/6/2024
2.1.37 77 2/6/2024
2.1.36 49,751 1/15/2024
2.1.35 631 1/15/2024
2.1.34 21,318 1/5/2024
2.1.33 1,972 1/5/2024
2.1.32 10,864 12/27/2023
2.1.31 1,114 12/27/2023
2.1.30 856 12/27/2023
2.1.29 6,114 12/25/2023
2.1.28 1,093 12/25/2023
2.1.27 585 12/25/2023
2.1.26 8,290 12/23/2023
2.1.25 93 12/23/2023
2.1.24 674 12/23/2023
2.1.23 16,447 12/9/2023
2.1.22 1,147 12/9/2023
2.1.21 178 12/9/2023
2.1.20 1,450 12/9/2023
2.1.19 8,609 12/4/2023
2.1.18 673 12/4/2023
2.1.17 4,049 11/26/2023
2.1.16 4,335 11/23/2023
2.1.15 231 11/23/2023
2.1.14 624 11/23/2023
2.1.13 7,291 11/19/2023
2.1.12 101 11/19/2023
2.1.11 853 11/18/2023
2.1.10 2,673 11/18/2023
2.1.9 1,582 11/18/2023
2.1.8 2,854 11/17/2023
2.1.7 950 11/17/2023
2.1.6 1,220 11/17/2023
2.1.5 564 11/17/2023
2.1.4 474 11/16/2023
2.1.3 117 11/16/2023
2.0.52 959 11/15/2023
2.0.51 1,306 11/15/2023
2.0.2 104 11/16/2023
2.0.1 105 11/16/2023
1.0.50 3,379 11/11/2023
1.0.49 87 11/11/2023
1.0.48 78 11/11/2023
1.0.47 1,099 11/9/2023
1.0.46 99 11/9/2023
1.0.45 4,167 11/6/2023
1.0.44 1,893 11/3/2023
1.0.43 1,520 11/2/2023
1.0.42 1,438 11/1/2023
1.0.41 6,118 10/18/2023
1.0.40 2,570 10/17/2023
1.0.39 945 10/16/2023
1.0.38 2,262 10/13/2023
1.0.37 124 10/13/2023
1.0.36 5,058 9/19/2023
1.0.35 1,649 9/18/2023
1.0.34 97 9/18/2023
1.0.33 6,372 8/30/2023
1.0.32 2,282 8/29/2023
1.0.31 3,491 8/24/2023
1.0.30 119 8/24/2023
1.0.29 3,914 8/17/2023
1.0.28 132 8/17/2023
1.0.27 7,251 8/7/2023
1.0.26 134 8/7/2023
1.0.25 7,104 7/10/2023
1.0.24 7,589 7/7/2023
1.0.23 135 7/7/2023
1.0.22 7,899 6/28/2023
1.0.21 38,844 5/24/2023
1.0.20 936 5/24/2023
1.0.19 339 5/23/2023
1.0.18 153 5/31/2023
1.0.17 2,483 5/23/2023
1.0.16 2,719 5/22/2023
1.0.15 5,149 5/17/2023
1.0.14 142 5/17/2023
1.0.13 4,913 4/28/2023
1.0.12 1,901 4/24/2023
1.0.11 822 4/21/2023
1.0.10 3,834 4/12/2023
1.0.9 895 4/11/2023
1.0.8 1,691 4/3/2023
1.0.7 199 4/3/2023
1.0.6 299 4/1/2023
1.0.5 1,851 3/23/2023
1.0.3 477 2/28/2023
1.0.2 386 2/16/2023