.NEXT (dotNext) is the family of powerful libraries aimed to improve development productivity and extend the .NET API with unique features. The project is supported by the .NET Foundation.
The documentation for previous major versions is no longer available on this website. However, API docs are still available on FuGet website for any specific library version. Migration guides are here.
This chapter gives a quick overview of these libraries. Read articles for a closer look at all available features.
- Runtime: .NET 6
- OS: Linux, Windows, MacOS, WebAssembly
- Architecture: any if supported by the underlying .NET Runtime
- Enum API to work with arbitrary enum types
- Thread-safe advanced atomic operations to work with int, long, bool, double, float, IntPtr, arbitrary reference and value types
- Unified representation of various synchronization primitives in the form of the lock
- Generic specialization with constant values
- Generation of random strings
- Fast comparison of arrays
- Ad-hoc user data associated with arbitrary object
- A rich set of dynamic buffer types
- Fast HEX conversion
- Fast Base64 encoding/decoding in streaming scenarios
- Optional and Result monads
- Soft Reference
.NET Reflection is slow because relies on late-bound calls when every actual argument should be validated. There is alternative approach: dynamic code generation optimized for every member call. Reflection library from .NEXT family provides provides fully-featured fast reflection using dynamic code generation. Invocation cost is comparable to direct call. Check Benchmarks to see how it is fast.
Additionally, the library provides support of Type Classes. You don't need to wait for C# language of version X to obtain this feature.
This library provides a rich API to write and execute code on-the-fly. It extends C# Expression Tree programming model with ordinary things for C# such as
lock statement, string interpolation and even asynchronous lambda expressions with full support of
- Structured access to unmanaged memory
- Unmanaged memory pool
- Interop with unmanaged memory via Memory value type
- CLS-compliant generic pointer type for .NET languages without direct support of such type. Use this feature to work with pointers from VB.NET or F#.
- Atomic thread-safe operations applicable to data placed into unmanaged memory: increment, decrement, compare-and-set etc, volatile access
The library allows you to reuse experience of blocking synchronization with help of ReaderWriteLockSlim, CountdownEvent and friends in asynchronous code using their alternatives such as asynchronous locks.
The following code describes these alternative implementations of synchronization primitives for asynchronous code:
|Synchronization Primitive||Asynchronous Version|
But this is not all features of this library. Read more here.
Extending streams and I/O pipelines with methods for reading and writing typed values including strings asynchronously. Arbitrary character encodings are supported. Now encoding or decoding data using pipes is much easier and comparable with BinaryWriter or BinaryReader. Read more here.
Provides rich framework for building clustered microservices based on network consensus and Gossip-based messaging. It includes transport-agnostic implementation of Raft Consensus Algorithm that can be adopted for any communication protocol, TCP/UDP transports for Raft, high-performance persistent Write-Ahead Log suitable for general-purpose usage. Transport-agnostic implementation of HyParView membership protocol included as well.
Allows to build clustered microservices which rely on network consensus and distributed messaging with ASP.NET Core framework. This library contains HTTP-based implementation of Raft Consensus Algorithm, HTTP-based distributed messaging across cluster nodes, cluster leader detection, automatic redirection to leader node, HTTP binding for HyParView.