Welcome to Cloudtoid's Framework project, which is a library of utility classes, targeting .net 9+.
The latest NuGet package can be found here.
- Banning a set of unsafe .NET APIs and providing alternatives to those APIs.
- A set of concurrency related extensions.
- Execution of actions within a specified timeout:
Async.WithTimeout - Automatic tracing if a task becomes faulted:
Async.TraceOnFaulted - Ability to fire and forget a task but log its failure:
Async.FireAndForget - Ability to create a
Taskthat is completed if aCancellationTokenis canceled:Async.WhenCancelled - Heap-allocation free pool of linked
CancellationTokenSources:LinkedCancellationToken
- Execution of actions within a specified timeout:
AsyncLazy<T>provides support for asynchronous lazy initialization.- A read-only list to contain null, zero, one, or more values in a memory efficient manner:
ReadOnlyValueList<TValue> - A set of code contracts to validate arguments and other states. See the
Contractsstatic class. - A set of collection extensions on
ICollection<T>,IReadOnlyCollection<T>,IList<T>,List<T>andT[]. - A set of extensions on
IEnumerable<T>. - A set of extensions on
Exceptionto:- Differentiate between a fatal extension and a non-fatal one
- Whether a task was timed out or canceled.
- A set of extensions on
Microsoft.Extensions.Configuration.IConfiguration. - A set of extensions on
IServiceCollection. - A set of extensions on
StringBuilder. - A set of non-volatile value providers used for mocking:
IGuidProviderthat can produce a stableGuidwhen needed.IDateTimeProviderandIDateTimeOffsetProviderthat can produce stableDateTimeandDateTimeOffsetwhen needed.
- A set of utility methods to help with
hashcodecreation and manipulation:HashUtil. - A set of utility methods for
stringmanipulation. SeeStringUtilandToStringExtensions. - A set of utility methods for HTTP related needs. See
HttpVersionfor HTTP protocol versioning,HttpMethodfor codifying HTTP methods, andHttpHeaderfor validating HTTP header names. - A set of utility methods for file and path related needs: PathUtil