![]() |
VOOZH | about |
dotnet add package NuExt.System --version 0.7.3
NuGet\Install-Package NuExt.System -Version 0.7.3
<PackageReference Include="NuExt.System" Version="0.7.3" />
<PackageVersion Include="NuExt.System" Version="0.7.3" />Directory.Packages.props
<PackageReference Include="NuExt.System" />Project file
paket add NuExt.System --version 0.7.3
#r "nuget: NuExt.System, 0.7.3"
#:package NuExt.System@0.7.3
#addin nuget:?package=NuExt.System&version=0.7.3Install as a Cake Addin
#tool nuget:?package=NuExt.System&version=0.7.3Install as a Cake Tool
NuExt.System is a lightweight, production-ready foundation for everyday .NET development. It brings together high-quality utilities for asynchrony, lifetime management, threading primitives, high‑performance spans/memory helpers, diagnostics, and collection helpers — all with a strong focus on performance, correctness, and developer ergonomics. Use it to reduce boilerplate, standardize common patterns across projects, and keep code fast and clean across modern .NET and .NET Framework.
👁 NuGet
👁 Build
👁 License
👁 Downloads
AsyncLock, ReentrantAsyncLock, AsyncWaitHandleDisposable, AggregateDisposable, AsyncDisposable, AggregateAsyncDisposable, AsyncLifetimeSpan / MemoryExtensions APIs (see below)ValueStringBuilder / ValueListBuilder<T> for zero‑allocation buildingObservableDictionary<TKey, TValue>, ReferenceEqualityComparer (polyfill), ArrayEqualityComparer<T>, and many useful extension helpersPathBuilder (class, IDisposable) and ValuePathBuilder (ref struct) — platform‑independent path buildersPathUtilities — static helpers for common path operationsProcessMonitor, PerformanceMonitor, EnumHelper<T>, TypeExtensions, etc.This package includes polyfills (API backports) for selected Span / MemoryExtensions‑style APIs from newer .NET versions. On modern runtimes, it transparently uses the inbox implementations; on older runtimes, it provides compatible behavior with the same semantics.
What you get (highlights)
Contains, SequenceEqual (+ IEqualityComparer<T>)IndexOf, LastIndexOf (element / sequence)IndexOfAny, LastIndexOfAny, IndexOfAnyExcept, LastIndexOfAnyExceptIndexOfAnyInRange, IndexOfAnyExceptInRange, LastIndexOfAnyInRange, LastIndexOfAnyExceptInRangeStartsWith, EndsWith, Replace (in‑place / copy), Count, CountAnyNotes
System.Threading.AsyncLock, System.Threading.ReentrantAsyncLock, System.Threading.AsyncWaitHandleSystem.ComponentModel.Disposable, AggregateDisposable, AsyncDisposable, AggregateAsyncDisposable, AsyncLifetimeSystem.Collections.ObjectModel.ObservableDictionary<TKey, TValue>System.Collections.Generic.ValueListBuilder<T>System.Collections.Generic.ReferenceEqualityComparer (polyfill)System.Collections.Generic.ArrayEqualityComparer<T>System.Text.ValueStringBuilderSystem.CompatMemoryExtensions (polyfills/backports)System.IO.PathBuilder (class, IDisposable — mutable path builder)System.IO.ValuePathBuilder (ref struct — high‑performance mutable path builder)System.IO.PathUtilities (static common path operations)System.Diagnostics.ProcessMonitor, PerformanceMonitorSystem.EnumHelper<T>, System.FormatUtils, System.HexConvertervar asyncLock = new System.Threading.ReentrantAsyncLock();
var cts = new CancellationTokenSource();
// Synchronous section
asyncLock.Acquire(() =>
{
// do work safely, reentry allowed on the same flow
});
// Asynchronous section
await asyncLock.AcquireAsync(async () =>
{
await DoAsyncWork();
});
// Avoid unintentionally flowing AsyncLocal into CT callbacks:
using (ExecutionContext.SuppressFlow())
{
cts.Token.Register(() => asyncLock.Acquire(() =>
{
// safe callback body
}));
}
var lifetime = new System.AsyncLifetime() { ContinueOnCapturedContext = true };
lifetime.AddDisposable(new FileStream(path, FileMode.Open));
lifetime.AddAsync(async () => await FlushBuffersAsync());
await lifetime.DisposeAsync(); // disposes in the right order, async‑aware
ValueStringBuilderSpan<char> initial = stackalloc char[128];
var sb = new System.Text.ValueStringBuilder(initial);
sb.Append("User: ");
sb.Append(userName);
sb.Append(", Items: ");
sb.Append(itemCount);
string result = sb.ToString(); // minimal allocations
ValueListBuilder<T> and ValueTask.WhenAllpublic class Example
{
public static async Task Main()
{
int failed = 0;
String[] urls = [ "www.adatum.com", "www.cohovineyard.com",
"www.cohowinery.com", "www.northwindtraders.com",
"www.contoso.com" ];
var tasks = new ValueListBuilder<ValueTask>(urls.Length);
foreach (var value in urls)
{
var url = value;
tasks.Append(new ValueTask(Task.Run(() =>
{
var png = new Ping();
try
{
var reply = png.Send(url);
if (reply.Status != IPStatus.Success)
{
Interlocked.Increment(ref failed);
throw new TimeoutException("Unable to reach " + url + ".");
}
}
catch (PingException)
{
Interlocked.Increment(ref failed);
throw;
}
})));
}
ValueTask t = ValueTask.WhenAll(tasks.ToArray());
try
{
await t;
}
catch { }
if (t.IsCompletedSuccessfully)
Console.WriteLine("All ping attempts succeeded.");
else if (t.IsFaulted)
Console.WriteLine("{0} ping attempts failed", failed);
}
}
ValueListBuilder<T> and ValueTask.WhenAll<TResult>public class Example
{
public static async Task Main()
{
int failed = 0;
String[] urls = [ "www.adatum.com", "www.cohovineyard.com",
"www.cohowinery.com", "www.northwindtraders.com",
"www.contoso.com" ];
var tasks = new ValueListBuilder<ValueTask<PingReply>>(urls.Length);
foreach (var value in urls)
{
var url = value;
tasks.Append(new ValueTask<PingReply>(Task.Run(() =>
{
var png = new Ping();
try
{
var reply = png.Send(url);
if (reply.Status != IPStatus.Success)
{
Interlocked.Increment(ref failed);
throw new TimeoutException("Unable to reach " + url + ".");
}
return reply;
}
catch (PingException)
{
Interlocked.Increment(ref failed);
throw;
}
})));
}
try
{
PingReply[] replies = await ValueTask.WhenAll(tasks.ToArray());
Console.WriteLine("{0} ping attempts succeeded:", replies.Length);
for (int i = 0; i < replies.Length; i++)
{
var reply = replies[i];
Console.WriteLine($"Reply from {reply.Address}: bytes={reply.Buffer.Length} time={reply.RoundtripTime}ms TTL={reply.Options?.Ttl} [{urls[i]}]");
}
}
catch (AggregateException)
{
Console.WriteLine("{0} ping attempts failed", failed);
}
}
}
Via NuGet:
dotnet add package NuExt.System
Or via Visual Studio:
Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution....NuExt.System.Some implementations are derived from the .NET Runtime (MIT). See LICENSE and source comments for attributions.
Issues and PRs are welcome. Keep changes minimal and performance-conscious.
MIT. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 is compatible. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 3 NuGet packages that depend on NuExt.System:
| Package | Downloads |
|---|---|
|
NuExt.DevExpress.Mvvm
Provides extensions and utilities for the DevExpress MVVM Framework with a focus on asynchronous operations in WPF. Improves async workflow handling, enhances ViewModel infrastructure, and offers async‑aware services that simplify building responsive MVVM applications. |
|
|
NuExt.System.Data
1High‑level data access utilities for .NET, providing extensions for DataReader, DataRow, and DataTable, plus lightweight DAL helpers, DbConverter, and IDbContext abstractions. Designed to simplify common database operations and improve consistency across data access layers. |
|
|
NuExt.Minimal.Mvvm.Wpf
NuExt.Minimal.Mvvm.Wpf is an extension for the lightweight MVVM framework NuExt.Minimal.Mvvm, specifically designed for WPF applications. Commonly Used Types: Minimal.Mvvm.ModelBase Minimal.Mvvm.Wpf.ControlViewModel Minimal.Mvvm.Wpf.DocumentContentViewModelBase Minimal.Mvvm.Wpf.WindowViewModel Minimal.Mvvm.Wpf.IAsyncDialogService Minimal.Mvvm.Wpf.IAsyncDocument Minimal.Mvvm.Wpf.IAsyncDocumentContent Minimal.Mvvm.Wpf.IAsyncDocumentManagerService Minimal.Mvvm.Wpf.InputDialogService Minimal.Mvvm.Wpf.OpenWindowsService Minimal.Mvvm.Wpf.SettingsService Minimal.Mvvm.Wpf.TabbedDocumentService Minimal.Mvvm.Wpf.ViewLocator Minimal.Mvvm.Wpf.WindowedDocumentService Minimal.Mvvm.Wpf.WindowPlacementService |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.3 | 446 | 3/15/2026 |
| 0.7.2 | 214 | 3/2/2026 |
| 0.7.1 | 127 | 2/24/2026 |
| 0.7.0 | 248 | 2/12/2026 |
| 0.6.0 | 306 | 1/11/2026 |
| 0.5.2 | 420 | 12/15/2025 |
| 0.5.1 | 342 | 12/14/2025 |
| 0.4.1 | 563 | 12/10/2025 |
| 0.4.0 | 307 | 12/5/2025 |
| 0.3.5 | 382 | 6/13/2025 |
| 0.3.4 | 345 | 3/6/2025 |
| 0.3.3 | 484 | 2/21/2025 |
| 0.3.2 | 458 | 1/22/2025 |
| 0.3.1 | 427 | 1/19/2025 |
| 0.3.0 | 440 | 1/13/2025 |
| 0.2.0 | 404 | 11/14/2024 |