X10D.Hosting 4.0.0

Prefix Reserved
dotnet add package X10D.Hosting --version 4.0.0
                    
NuGet\Install-Package X10D.Hosting -Version 4.0.0
                    
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="X10D.Hosting" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="X10D.Hosting" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="X10D.Hosting" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add X10D.Hosting --version 4.0.0
                    
#r "nuget: X10D.Hosting, 4.0.0"
                    
#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.
#:package X10D.Hosting@4.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=X10D.Hosting&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=X10D.Hosting&version=4.0.0
                    
Install as a Cake Tool

<h1 align="center"><img src="branding_Banner.png"></h1> <p align="center"> <a href="https://github.com/oliverbooth/X10D/actions/workflows/dotnet.yml"><img src="https://img.shields.io/github/actions/workflow/status/oliverbooth/X10D/dotnet.yml?style=flat-square" alt="GitHub Workflow Status" title="GitHub Workflow Status"></a> <a href="https://github.com/oliverbooth/X10D/issues"><img src="https://img.shields.io/github/issues/oliverbooth/X10D?style=flat-square" alt="GitHub Issues" title="GitHub Issues"></a> <a href="https://app.codecov.io/gh/oliverbooth/X10D/"><img src="https://img.shields.io/codecov/c/github/oliverbooth/X10D?style=flat-square" alt="Coverage"></a> <a href="https://www.nuget.org/packages/X10D/"><img src="https://img.shields.io/nuget/dt/X10D?style=flat-square" alt="NuGet Downloads" title="NuGet Downloads"></a> <a href="https://www.nuget.org/packages/X10D/"><img src="https://img.shields.io/nuget/v/X10D?label=stable&style=flat-square" alt="Stable Version" title="Stable Version"></a> <a href="https://www.nuget.org/packages/X10D/"><img src="https://img.shields.io/nuget/vpre/X10D?label=nightly&style=flat-square" alt="Nightly Version" title="Nightly Version"></a> <a href="https://github.com/oliverbooth/X10D/blob/master/LICENSE.md"><img src="https://img.shields.io/github/license/oliverbooth/X10D?style=flat-square" alt="MIT License" title="MIT License"></a> </p>

About

X10D (pronounced extend), is a .NET package that provides extension methods for numerous types. The purpose of this library is to simplify a codebase by reducing the need for repeated code when performing common operations. Simplify your codebase. Take advantage of .NET. Use extension methods.

(I'm also dogfooding this library, so there's that.)

What are extension methods?

Extension methods are a clever .NET feature that augment existing types with new functionality. They are defined as static methods in a static class, and are called as if they were instance methods on the type they are extending. Take, for example, the following code:

public static class Program
{
    public static void Main()
    {
        string str = "Hello, world!";
        Console.WriteLine(str.Reverse());
    }
}

public static class StringExtensions
{
    public static string Reverse(this string str)
    {
        char[] chars = str.ToCharArray();
        Array.Reverse(chars);
        return new string(chars);
    }
}

This will print !dlrow ,olleH to the console. The Reverse method is defined in the StringExtensions class, yet is called as if it were an instance method on the str variable, even though it's not.

Why use extension methods?

Extension methods were introduced when LINQ was added to .NET. LINQ is a set of extension methods that provide a way to query, filter, and transform data. If you were to access LINQ's methods statically, you would have to write code like this:

public static class Program
{
    public static void Main()
    {
        int[] numbers = { 1, 2, 3, 4, 5 };
        IEnumerable<int> evenNumbers = Enumerable.Where(numbers, x => x % 2 == 0);
        IEnumerable<int> doubledNumbers = Enumerable.Select(evenNumbers, x => x * 2);
        int sum = Enumerable.Sum(doubledNumbers);
        Console.WriteLine(sum);
    }
}

And if you wanted to one-line this, you'd have to write this:

public static class Program
{
    public static void Main()
    {
        int[] numbers = { 1, 2, 3, 4, 5 };
        Console.WriteLine(Enumerable.Sum(Enumerable.Select(Enumerable.Where(numbers, x => x % 2 == 0), x => x * 2)));
    }
}

This is a lot of code to write, and it's not very readable. The nested method calls make it incredibly difficult to follow. However, because LINQ is implemented as extension methods, you can write the following code instead:

public static class Program
{
    public static void Main()
    {
        int[] numbers = { 1, 2, 3, 4, 5 };
        Console.WriteLine(numbers.Where(x => x % 2 == 0).Select(x => x * 2).Sum());
    }
}

Because the methods are called as if they were instance methods on IEnumerable<T>, they can be chained together, making the code much more readable.

X10D aims to provide these same benefits as LINQ, but for dozens of other types and for countless other use cases. See the documentation for a complete breakdown of what's available.

Installation

NuGet installation

Install-Package X10D -Version 4.0.0

Manual installation

Download the latest release from this repository and adding a direct assembly reference for your chosen platform.

Documentation

Documentation and the API reference is available at https://oliverbooth.github.io/X10D/index.html. I'm sorry this took so long to get up and running. DocFX will be the death of me.

Contributing

Contributions are welcome. See CONTRIBUTING.md.

License

X10D is released under the MIT License. See here for more details.

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 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 661 6/12/2024
4.0.0-nightly.250 80 6/12/2024
4.0.0-nightly.246 145 8/28/2023
4.0.0-nightly.236 191 5/14/2023
4.0.0-nightly.234 141 4/14/2023
4.0.0-nightly.233 146 4/14/2023
4.0.0-nightly.232 134 4/13/2023
4.0.0-nightly.231 143 4/13/2023
4.0.0-nightly.230 136 4/13/2023
4.0.0-nightly.229 137 4/12/2023
4.0.0-nightly.228 145 4/10/2023
4.0.0-nightly.227 172 4/6/2023
4.0.0-nightly.226 144 4/6/2023
4.0.0-nightly.225 152 4/5/2023
3.3.1 636 8/21/2023
3.3.1-nightly.249 95 2/17/2024
3.3.1-nightly.248 82 2/17/2024
3.3.1-nightly.247 96 2/12/2024
3.3.1-nightly.242 133 8/21/2023
3.3.0 205 8/21/2023
3.3.0-nightly.241 133 8/21/2023
3.2.2 734 6/5/2023
3.2.2-nightly.240 134 8/9/2023
3.2.2-nightly.239 137 6/5/2023
3.2.0 381 4/3/2023
3.2.0-nightly.224 145 4/3/2023
3.2.0-nightly.223 134 4/3/2023
3.2.0-nightly.222 156 4/3/2023
3.2.0-nightly.221 148 4/3/2023
3.2.0-nightly.220 143 4/3/2023
3.2.0-nightly.219 145 4/3/2023
3.2.0-nightly.218 148 4/3/2023
3.2.0-nightly.217 143 4/3/2023
3.2.0-nightly.216 138 4/3/2023
3.2.0-nightly.215 145 4/3/2023
3.2.0-nightly.214 140 4/3/2023
3.2.0-nightly.213 146 4/3/2023
3.2.0-nightly.212 136 4/3/2023
3.2.0-nightly.211 146 4/2/2023
3.2.0-nightly.210 144 4/2/2023
3.2.0-nightly.208 145 4/2/2023
3.2.0-nightly.207 157 4/2/2023
3.2.0-nightly.206 145 4/2/2023
3.2.0-nightly.205 150 4/2/2023
3.2.0-nightly.204 147 4/2/2023
3.2.0-nightly.203 146 4/2/2023
3.2.0-nightly.202 163 4/2/2023
3.2.0-nightly.201 147 4/2/2023
3.2.0-nightly.200 150 4/2/2023
3.2.0-nightly.199 150 4/2/2023
3.2.0-nightly.198 157 4/2/2023
3.2.0-nightly.197 153 4/2/2023
3.2.0-nightly.196 147 4/2/2023
3.2.0-nightly.195 146 4/2/2023
3.2.0-nightly.193 144 4/2/2023
3.2.0-nightly.192 136 4/1/2023
3.2.0-nightly.191 144 4/1/2023
3.2.0-nightly.190 144 4/1/2023
3.2.0-nightly.189 150 4/1/2023
3.2.0-nightly.188 152 4/1/2023
3.2.0-nightly.186 156 3/31/2023
3.2.0-nightly.185 148 3/31/2023
3.2.0-nightly.184 141 3/31/2023
3.2.0-nightly.183 139 3/31/2023
3.2.0-nightly.182 139 3/31/2023
3.2.0-nightly.181 153 3/31/2023
3.2.0-nightly.180 140 3/31/2023
3.2.0-nightly.179 149 3/31/2023
3.2.0-nightly.178 125 3/30/2023
3.2.0-nightly.177 143 3/30/2023
3.2.0-nightly.176 132 3/30/2023
3.2.0-nightly.175 134 3/30/2023
3.2.0-nightly.174 148 3/29/2023
3.2.0-nightly.173 154 3/29/2023
3.2.0-nightly.172 152 3/29/2023
3.2.0-nightly.171 158 3/28/2023
3.2.0-nightly.170 147 3/28/2023
3.2.0-nightly.169 145 3/28/2023
3.2.0-nightly.168 143 3/28/2023
3.2.0-nightly.165 171 3/26/2023
3.2.0-nightly.164 157 3/23/2023
3.2.0-nightly.163 253 2/28/2023
3.2.0-nightly.162 149 2/27/2023
3.2.0-nightly.161 156 2/27/2023
3.2.0-nightly.160 150 2/27/2023
3.2.0-nightly.159 146 2/27/2023
3.2.0-nightly.158 151 2/26/2023
3.2.0-nightly.157 154 2/26/2023
3.2.0-nightly.156 158 2/26/2023
3.2.0-nightly.155 153 2/26/2023
3.2.0-nightly.154 151 2/26/2023
3.2.0-nightly.153 150 2/26/2023
3.2.0-nightly.152 287 2/19/2023
3.2.0-nightly.151 174 2/5/2023
3.2.0-nightly.150 174 12/31/2022
3.2.0-nightly.149 200 12/22/2022
3.2.0-nightly.148 159 12/22/2022
3.2.0-nightly.147 247 12/21/2022
3.2.0-nightly.145 175 12/6/2022
3.2.0-nightly.144 179 12/1/2022
3.2.0-nightly.143 160 12/1/2022
3.2.0-nightly.142 161 11/29/2022
3.2.0-nightly.141 174 11/29/2022
3.2.0-nightly.140 172 11/29/2022
3.2.0-nightly.139 171 11/29/2022
3.2.0-nightly.136 150 11/29/2022
3.2.0-nightly.135 162 11/28/2022
3.2.0-nightly.134 177 11/26/2022
3.2.0-nightly.133 454 7/30/2022
3.2.0-nightly.132 278 7/23/2022
3.2.0-nightly.131 169 7/23/2022
3.2.0-nightly.130 178 7/21/2022
3.2.0-nightly.129 187 7/21/2022
3.2.0-nightly.128 202 7/21/2022
3.2.0-nightly.127 189 7/20/2022

See CHANGELOG.md for a full list of changes.