Hackmesser.Execution 1.0.0

Install-Package Hackmesser.Execution -Version 1.0.0
dotnet add package Hackmesser.Execution --version 1.0.0
<PackageReference Include="Hackmesser.Execution" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hackmesser.Execution --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Hackmesser.Execution, 1.0.0"
#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 Hackmesser.Execution as a Cake Addin
#addin nuget:?package=Hackmesser.Execution&version=1.0.0

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

Execution strategy allow you to handle exceptions easy and compact.

Usages

    var objectExecutionStrategy = new ExecutionStrategyBuilder<object>()
        .Wrap(LoadingWrapperAsync)
        .IgnoreOn<OperationCanceledException>()
        .ReturnOn<AppException>(new object())
        .ExecuteOn<Exception>(TrackExceptionAsync)
        .Build();

    var objectOperationResult = await objectExecutionStrategy.ExecuteAsync(DoSomeObjectRequestAsync);

    if (objectOperationResult.IsCompleted)
    {
        var obj = objectOperationResult.Result;
    }

    var executionStrategy = new ExecutionStrategyBuilder()
        .Wrap(LoadingWrapperAsync)
        .IgnoreOn<OperationCanceledException>()
        .RetryOn<Exception>(retryCount:3)
        .Build();

    var operationResult = await executionStrategy.ExecuteAsync(DoSomeRequestAsync);

    if (operationResult.IsFaulted)
    {
        //Do what you need
    }
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 203 10/24/2020