Improvements
- Introduce the
DefaultErrorProcessor<TParam>
,ProcessingErrorContext<TParam>
andProcessingErrorInfo<TParam>
classes. - Introduce the
SimplePolicy.Handle<TErrorContext>(Action, TErrorContext, CancellationToken)
method. - Introduce the
SimplePolicy.Handle<TParam>(Action<TParam>, TParam, CancellationToken)
method. - Introduce the
Handle<TParam, T>(Func<TParam, T>, TParam, CancellationToken)
andHandle<TErrorContext, T>(Func<T> func, TErrorContext param, CancellationToken)
methods ofSimplePolicy
. - Introduce overloads for the
SimplePolicy.HandleAsync<TParam>
andSimplePolicy.HandleAsync<TErrorContext>
methods. - Introduce overloads for the
SimplePolicy.HandleAsync<TParam, T>
andSimplePolicy.HandleAsync<TErrorContext, T>
methods. - Introduce the
SimplePolicy.WithErrorContextProcessor<TErrorContext>
andSimplePolicy.WithErrorContextProcessorOf<TErrorContext>
method overloads. - Introduce the
SimplePolicyProcessor.Execute<TParam>(Action)
method. - Introduce the
SimplePolicyProcessor.Execute<TParam>(Action<TParam>, TParam, token)
method. - Introduce the
SimplePolicyProcessor.Execute<TErrorContext, T>(Func<T>, TErrorContext, CancellationToken)
method. - Introduce the
SimplePolicyProcessor.Execute<TParam, T>(Func<TParam, T>, TParam, CancellationToken)
method. - Introduce the
SimplePolicyProcessor.ExecuteAsync<TErrorContext>(Func<CancellationToken, Task>, TErrorContext, bool, CancellationToken)
method. - Introduce the
SimplePolicyProcessor.ExecuteAsync<TParam>(Func<TParam, CancellationToken, Task>, TParam, bool, CancellationToken)
method. - Introduce the
SimplePolicyProcessor.ExecuteAsync<TErrorContext, T>(Func<CancellationToken, Task<T>>, TErrorContext, bool, CancellationToken)
method. - Introduce the
SimplePolicyProcessor.ExecuteAsync<TParam, T>(Func<TParam, CancellationToken, Task<T>>, TParam, bool, CancellationToken)
method. - Introduce the
SimplePolicyProcessor.WithErrorContextProcessor<TErrorContext>
andSimplePolicyProcessor.WithErrorContextProcessorOf<TErrorContext>
method overloads. - Introduce the
Func<CancellationToken, Task<T>>.InvokeWithTryCatchAsync
extension method. - Introduce
InvokeWithTryCatchAsync
extension methods overloads for theFunc<CancellationToken, Task<T>>
,Func<CancellationToken, Task>
delegates. - Introduce the
Func<CancellationToken, Task>.InvokeWithTryCatchAsync
extension method. - Introduce the
Func<T>.InvokeWithTryCatch
extension method. - Introduce the
Action.InvokeWithTryCatch
extension method. - Introduce
TryCatchBuilder.AddCatchBlock
method overloads withNonEmptyCatchBlockFilter
,IBulkErrorProcessor
parameters. - Introduce the
TryCatchBuilder.AddCatchBlock
method overload with theNonEmptyCatchBlockFilter
parameter. - Introduce the
TryCatchBuilder.AddCatchBlock
method overload with theIBulkErrorProcessor
parameter. - Introduce
TryCatchBuilder.CreateFrom
method overload withNonEmptyCatchBlockFilter
,IBulkErrorProcessor
parameters. - Introduce the
TryCatchBuilder.CreateFrom
method overload with theNonEmptyCatchBlockFilter
parameter. - Introduce the
TryCatchBuilder.CreateFrom
method overload with theIBulkErrorProcessor
parameter. - Introduce shorthand
TryCatchBuilder.CreateAndBuild
method without parameters. - Introduce shorthand
TryCatchBuilder.CreateAndBuild
method with theIBulkErrorProcessor
parameter - Introduce shorthand
TryCatchBuilder.CreateAndBuild
method with theFunc<Exception, Task>
parameter. - Introduce shorthand
TryCatchBuilder.CreateAndBuild
method with theAction<Exception>
parameter.
Small changes
- Deprecate the
BulkErrorProcessor(PolicyAlias)
constructor. - Made
PolicyProcessor
constructors that use thePolicyAlias
parameter and the_isPolicyAliasSet
field obsolete. - Call the
ConfigureAwait
method in theErrorProcessorBase.ProcessAsync
method with theconfigAwait
parameter passed. - Add the internal class
EmptyErrorContext<TParam>
. - Add the
Policy.HasPolicyWrapperFactory
internal property. - Add the Rider-related .gitignore.
Docs changes
- Edit 'Policy wrap' README Chapter.
- Update 'RetryPolicy' README Chapter and example in README for NuGet package.
Bumps and Dependency updates
- Bump the nunit group with 7 updates.
- Remove old references to NUnit-related nuget packages in the PoliNorError.Tests project file.