Bnaya.CSharp.AsyncExtensions 1.0.49

.NET Standard 2.0
There is a newer version of this package available.
See the version list below for details.
Install-Package Bnaya.CSharp.AsyncExtensions -Version 1.0.49
dotnet add package Bnaya.CSharp.AsyncExtensions --version 1.0.49
<PackageReference Include="Bnaya.CSharp.AsyncExtensions" Version="1.0.49" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bnaya.CSharp.AsyncExtensions --version 1.0.49
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Bnaya.CSharp.AsyncExtensions, 1.0.49"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Bnaya.CSharp.AsyncExtensions as a Cake Addin
#addin nuget:?package=Bnaya.CSharp.AsyncExtensions&version=1.0.49

// Install Bnaya.CSharp.AsyncExtensions as a Cake Tool
#tool nuget:?package=Bnaya.CSharp.AsyncExtensions&version=1.0.49
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Useful extensions contribution by Bnaya Eshet
Blog: http://blogs.microsoft.co.il/bnaya/

Source Code:
https://github.com/bnayae/Bnaya.CSharp.AsyncExtensions


# NuGet
this library available on NuGet via
Install-Package Bnaya.CSharp.AsyncExtensions

## This library have the following goodies:
* Exception Handling
 * ThrowAll (produce AggregateException when waiting on Task.WhenAll)
 * Format (format async exception into friendlier call-stack representation)
* Timeout (will apply timeout semantic for any Task)
 * WithTimeout (will throw on timeout)
 * IsTimeoutAsync (will return indication without throwing, ideal for SLA checks [practice: check and produce warning])
* Cancellation
 * CancelSafe (will run the CancellationTokenSource.Cancel within try catch and prevent unexpected side effect which can happen when cancellation token registration throw)
* Friendly async locking facilities (which can replace the classical lock statement).
 * Extensions
   * TryAcquireAsync
   * AcquireAsync
 * Instance-able
   * AsyncLock
* WhenN: use to complete task after n task succeed

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Bnaya.CSharp.AsyncExtensions:

Package Downloads
Weknow.EventSource.Backbone.Contracts

Package Description

Weknow.EventSource.Backbone

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.54 136 4/12/2022
1.0.52 51 4/12/2022
1.0.51 49 4/12/2022
1.0.49 2,766 12/30/2021
1.0.28 19,933 7/24/2020
1.0.27 483 6/12/2020
1.0.25 1,253 8/17/2018
1.0.23 933 5/2/2018
1.0.22 746 5/2/2018
1.0.21 684 4/17/2018
1.0.20 770 4/16/2018
1.0.19 737 4/15/2018
1.0.18 860 4/14/2018
1.0.15 767 12/21/2017
1.0.14 752 12/21/2017
1.0.13 788 11/23/2017
1.0.11 954 11/21/2017
1.0.7 918 11/16/2017

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.

example:
logger.LogError(ex.FormatLazy(), "Fault execution");