Bnaya.CSharp.AsyncExtensions 1.0.27

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 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])
* Cancellation
 * CancelSafe (will run the CancellationTokenSource.Cancel within try catch and prevent unexpected side effect which can happen when cancellation token registration throw)
* Frendly async locking facilities (which can replace the clasical lock statement).
 * Extensions
   * TryAcquireAsync
   * AcquireAsync
 * Instance-able
   * AsyncLock
* WhenN: use to complete task aftern 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.

There is a newer version of this package available.
See the version list below for details.
Install-Package Bnaya.CSharp.AsyncExtensions -Version 1.0.27
dotnet add package Bnaya.CSharp.AsyncExtensions --version 1.0.27
<PackageReference Include="Bnaya.CSharp.AsyncExtensions" Version="1.0.27" />
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.27
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

Release 1.0.27 (Breaking Changes)
Remove obsolete api of exception fomatting.

Add FormatLazy which is better citizen for modern logger scenatios.
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");

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.28 50 7/24/2020
1.0.27 253 6/12/2020
1.0.25 858 8/17/2018
1.0.23 486 5/2/2018
1.0.22 346 5/2/2018
1.0.21 336 4/17/2018
1.0.20 383 4/16/2018
1.0.19 387 4/15/2018
1.0.18 464 4/14/2018
1.0.15 409 12/21/2017
1.0.14 397 12/21/2017
1.0.13 431 11/23/2017
1.0.11 604 11/21/2017
1.0.7 565 11/16/2017