Zentient.Extensions 1.0.0-beta

This is a prerelease version of Zentient.Extensions.
dotnet add package Zentient.Extensions --version 1.0.0-beta
                    
NuGet\Install-Package Zentient.Extensions -Version 1.0.0-beta
                    
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="Zentient.Extensions" Version="1.0.0-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zentient.Extensions" Version="1.0.0-beta" />
                    
Directory.Packages.props
<PackageReference Include="Zentient.Extensions" />
                    
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 Zentient.Extensions --version 1.0.0-beta
                    
#r "nuget: Zentient.Extensions, 1.0.0-beta"
                    
#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 Zentient.Extensions@1.0.0-beta
                    
#: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=Zentient.Extensions&version=1.0.0-beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Zentient.Extensions&version=1.0.0-beta&prerelease
                    
Install as a Cake Tool

Zentient.Extensions API

Zentient.Extensions is a part of the Zentient Framework that provides a collection of useful extension methods for various types in C#. These methods extend the functionality of existing types, making it easier to perform common operations.

Getting Started

To use Zentient.Extensions, first install the NuGet package in your project:

Install-Package Zentient.Extensions

Then, you can start using the extension methods in your code. For example, to shuffle an array:

int[] array = new int[] { 1, 2, 3, 4, 5 };
array = array.Shuffle().ToArray();

In this example, Shuffle is an extension method provided by Zentient.Extensions that randomly shuffles the elements of an array.

Features

Zentient.Extensions provides extension methods for various types, including:

  • Array Extensions: Provides methods for shuffling, chunking, finding the index of elements based on a predicate, and removing duplicate elements from arrays.
  • Collection Extensions: Provides methods for adding a range of items to a collection, removing all elements from a collection based on a predicate, checking if a collection is null or empty, joining elements of a collection into a single string, and checking if a collection contains all elements of another collection. **
  • Dictionary Extensions: Provides methods for adding or updating items in a dictionary, removing items from a dictionary based on a predicate, and getting the value associated with a key or returning a default value if the key is not found.
  • Enumerable Extensions: Provides methods for checking if an enumerable is null or empty, joining elements of an enumerable into a single string, and checking if an enumerable contains all elements of another enumerable.
  • String Extensions: Provides methods for converting a string to a byte array, checking if a string is null or empty, checking if a string contains another string case-insensitively, and checking if a string is a valid email address.

Usage

The extension methods provided by Zentient.Extensions can be used directly on instances of the types they extend. For example, to toggle a boolean value:

bool value = true;
value = value.Toggle();

In this example, Toggle is an extension method provided by Zentient.Extensions that toggles a boolean value.

License

Zentient.Extensions is licensed under the MIT License. See the LICENSE file for more information.

Contributing

We welcome contributions to Zentient.Extensions! Please see our contributing guide for more information.

Product 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.  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
1.0.0-beta 81 6/5/2024