Zentient.Extensions
1.0.0-beta
dotnet add package Zentient.Extensions --version 1.0.0-beta
NuGet\Install-Package Zentient.Extensions -Version 1.0.0-beta
<PackageReference Include="Zentient.Extensions" Version="1.0.0-beta" />
<PackageVersion Include="Zentient.Extensions" Version="1.0.0-beta" />
<PackageReference Include="Zentient.Extensions" />
paket add Zentient.Extensions --version 1.0.0-beta
#r "nuget: Zentient.Extensions, 1.0.0-beta"
#:package Zentient.Extensions@1.0.0-beta
#addin nuget:?package=Zentient.Extensions&version=1.0.0-beta&prerelease
#tool nuget:?package=Zentient.Extensions&version=1.0.0-beta&prerelease
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 | 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. 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. |
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.6)
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 | 176 | 6/5/2024 |