Bnaya.CSharp.AsyncExtensions
1.0.28
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.
Install-Package Bnaya.CSharp.AsyncExtensions -Version 1.0.28
dotnet add package Bnaya.CSharp.AsyncExtensions --version 1.0.28
<PackageReference Include="Bnaya.CSharp.AsyncExtensions" Version="1.0.28" />
paket add Bnaya.CSharp.AsyncExtensions --version 1.0.28
Release Notes
Release 1.0.28 (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");
Dependencies
-
.NETStandard 2.0
- System.Threading.Tasks.Extensions (>= 4.5.4)
Used By
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 | 256 | 7/24/2020 |
1.0.27 | 337 | 6/12/2020 |
1.0.25 | 945 | 8/17/2018 |
1.0.23 | 561 | 5/2/2018 |
1.0.22 | 427 | 5/2/2018 |
1.0.21 | 406 | 4/17/2018 |
1.0.20 | 459 | 4/16/2018 |
1.0.19 | 457 | 4/15/2018 |
1.0.18 | 539 | 4/14/2018 |
1.0.15 | 486 | 12/21/2017 |
1.0.14 | 471 | 12/21/2017 |
1.0.13 | 513 | 11/23/2017 |
1.0.11 | 677 | 11/21/2017 |
1.0.7 | 641 | 11/16/2017 |