sharpessentials.functions
1.2.7
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package sharpessentials.functions --version 1.2.7
NuGet\Install-Package sharpessentials.functions -Version 1.2.7
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="sharpessentials.functions" Version="1.2.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="sharpessentials.functions" Version="1.2.7" />
<PackageReference Include="sharpessentials.functions" />
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 sharpessentials.functions --version 1.2.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: sharpessentials.functions, 1.2.7"
#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 sharpessentials.functions@1.2.7
#: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=sharpessentials.functions&version=1.2.7
#tool nuget:?package=sharpessentials.functions&version=1.2.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SharpEssentials
SharpEssentials is the ultimate C# utility library for .NET developers, helping you write cleaner, more efficient code with zero dependencies.
Table of Contents
- Features
- Installation
- Getting Started
- Usage Examples
- Why Choose SharpEssentials?
- Documentation
- Contributing
- Support & Community
- License
Features
Core Utilities
- Argument Validation:
ThrowIfNull,ThrowIfEmpty,ThrowIfInvalid - Type Helpers: Safe casting, null coalescing, enum parsing
- Exception Handling: Retry policies, exception unwrapping
Collections & LINQ
Batch,DistinctBy,ToDictionarySafeForEachWithIndex,Shuffle,Paginate
Functional Programming
Option<T>,Result<T>,Either<L, R>- Pattern matching extensions
String Operations
- Truncation, formatting, validation
- Levenshtein distance, phonetic matching
DateTime Helpers
- Business day calculations
- Timezone conversions
- Human-readable intervals ("2 hours ago")
Installation
Use your preferred .NET package manager:
# NuGet Package Manager
Install-Package SharpEssentials
# .NET CLI
dotnet add package SharpEssentials
# Paket CLI
paket add SharpEssentials
Compatibility: .NET 8.0+
Getting Started
using SharpEssentials;
// Validate arguments
order.ThrowIfNull(nameof(order));
// Batch operations
var batches = Enumerable.Range(1, 1000).Batch(100);
// Functional result handling
var result = Result.Try(ParseConfigFile);
result.Match(
success: config => Save(config),
failure: ex => Log.Error(ex)
);
Usage Examples
Retry Policy with Exponential Backoff
var data = await RetryPolicy
.WithExponentialBackoff(3, TimeSpan.FromSeconds(1))
.ExecuteAsync(() => FetchRemoteDataAsync());
String Helpers
var clean = " HELLO world ".TrimAll(); // "HELLO world"
var similarity = "color".SimilarityTo("colour"); // 0.91
Why Choose SharpEssentials?
| Metric | SharpEssentials | Alternatives |
|---|---|---|
| Performance | β‘ Optimized | π’ Slower |
| Dependencies | 0 | 3+ |
| Maintenance | Active | Abandoned |
| Documentation | β Comprehensive | Minimal |
- Battle-tested in production
- Consistent, intuitive API
- Detailed XML docs with examples
Documentation
- π Full API Reference
- π GitHub Wiki
- π¬ Video Tutorials
Contributing
We welcome your contributions! Please:
- Fork the repo
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m "Add AmazingFeature") - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
git clone https://github.com/yourname/SharpEssentials.git
cd SharpEssentials
dotnet restore
dotnet build
dotnet test
Support & Community
- π FAQ
- π Report Issues
- π¬ Join our Discord
- π’ Follow us on Twitter and LinkedIn
License
Distributed under the MIT License. See LICENSE for details.
Thank you for choosing SharpEssentials! π Happy coding! π»π
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.Extensions.Http.Polly (>= 9.0.4)
- Polly (>= 8.5.2)
- Polly.Extensions (>= 8.5.2)
- System.Security.Cryptography.Xml (>= 9.0.5)
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.2.22 | 297 | 10/28/2025 |
| 1.2.21 | 239 | 9/29/2025 |
| 1.2.20 | 191 | 9/29/2025 |
| 1.2.19 | 215 | 7/18/2025 |
| 1.2.18 | 197 | 7/14/2025 |
| 1.2.17 | 126 | 7/12/2025 |
| 1.2.16 | 211 | 6/23/2025 |
| 1.2.15 | 193 | 6/19/2025 |
| 1.2.14 | 181 | 6/19/2025 |
| 1.2.13 | 197 | 6/18/2025 |
| 1.2.12 | 196 | 6/16/2025 |
| 1.2.11 | 247 | 6/13/2025 |
| 1.2.10 | 239 | 6/8/2025 |
| 1.2.9 | 112 | 6/6/2025 |
| 1.2.8 | 259 | 5/23/2025 |
| 1.2.7 | 196 | 5/21/2025 |
| 1.2.6 | 191 | 5/21/2025 |
| 1.2.5 | 190 | 5/19/2025 |
| 1.2.4 | 179 | 5/19/2025 |
| 1.2.3 | 191 | 5/19/2025 |
Loading failed