dotnet add package Bnaya.CSharp.AsyncExtensions --version 1.0.68
NuGet\Install-Package Bnaya.CSharp.AsyncExtensions -Version 1.0.68
<PackageReference Include="Bnaya.CSharp.AsyncExtensions" Version="1.0.68" />
paket add Bnaya.CSharp.AsyncExtensions --version 1.0.68
#r "nuget: Bnaya.CSharp.AsyncExtensions, 1.0.68"
// Install Bnaya.CSharp.AsyncExtensions as a Cake Addin #addin nuget:?package=Bnaya.CSharp.AsyncExtensions&version=1.0.68 // Install Bnaya.CSharp.AsyncExtensions as a Cake Tool #tool nuget:?package=Bnaya.CSharp.AsyncExtensions&version=1.0.68
Contribution of useful async pattern, API, Extensions, etc.
this library available on NuGet via Install-Package Bnaya.CSharp.AsyncExtensions
This library have the following godies:
- Exception Handlinfg
- ThrowAll (produce AggregateException when waiting on Task.WhenAll)
- Format (format async exception into friendlier callstack represantation)
- Timeout (will apply timeout semantic for any Task)
- WithTimeout (will throw on timeout)
- IsTimeoutAsync (will return indication without throwing, ideal for SLA checks [prctice: check and produce warning])
- CancelSafe (will run the CancellationTokenSource.Cancel within try catch and prevent unexpected side effect which can happen when cancellation token registration throw)
- RegisterWeak (use week registration to cancellation token, letting the GC to collect the instance of the registration even when the token is still alive, can reduce potential for memory leaks)
- Frendly async locking facilities (which can replace the clasical lock statement).
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android 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.|
- System.Threading.Tasks.Extensions (>= 4.5.4)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Bnaya.CSharp.AsyncExtensions:
This package is not used by any popular GitHub repositories.
Release 1.0.27 (Breaking Changes)
Remove obsolete api of exception formatting.
Add FormatLazy which is better citizen for modern logger scenarios.
It will do the formatting on the ToString time i.e won't format logs which was filtered out.
logger.LogError(ex.FormatLazy(), "Fault execution");