- Introduce abstract
TypedErrorProcessor<TException>with an overridableExecutemethod for type-specific error processing. - Introduce
DefaultTypedErrorProcessor<TException>for typed exception handling. - Added implicit conversions from
*RetryDelayOptionsto their corresponding*RetryDelaytypes. - Extract
DelayCoreBaseinternal abstract base class. - Introduced
*DelayCoreclasses (ConstantDelayCore,LinearDelayCore,ExponentialDelayCore,TimeSeriesDelayCore) to streamline constructor logic and simplify initialization forConstantRetryDelay,LinearRetryDelay,ExponentialRetryDelay, andTimeSeriesRetryDelay. - Make the
ErrorContext<T>class public (previously internal). - Add
FromErrors<TException1, TException2>andFromErrors<TException1, TException2, TException3>methods toErrorSet. - Add
HasError<TException>andHasInnerError<TInnerException>methods toErrorSet. - Add internal
StandardJitterclass. - Materialize
BulkProcessResult.ProcessErrorsonce and replace LINQSelectwith iterator inToCatchBlockExceptionsmethod to avoid re-enumeration and extra allocations. - Add the
BulkProcessResult.HasProcessErrorsproperty and tests for theBulkProcessResultclass. - Guard the call to
BulkProcessResult.ToCatchBlockExceptionswithBulkProcessResult.HasProcessErrorsinPolicyResult.AddBulkProcessorErrors. - Add
IsCanceledBetweenProcessorsandCancellationExceptionproperties toBulkProcessResult. - Replace tuple
(ErrorProcessorException, Exception)withProcessorResultinBulkErrorProcessor. - Do not set
BulkProcessResult.IsCanceledBetweenProcessorstotruewhen cancellation occurs within a processor inBulkErrorProcessor.ProcessandProcessAsync. - Add synthetic
ErrorProcessorExceptionwith innerOperationCanceledExceptiontoBulkProcessResult.ProcessErrorswhen cancellation occurs at start or between processors inBulkErrorProcessor.Process/ProcessAsync. - DRY refactor
BulkErrorProcessor.Process/ProcessAsync. - Refactor
DelayErrorProcessor: eliminate redundant allocation, use pattern matching for delay retrieval. - Add public
ErrorProcessingCancellationEffectenum. - Add public
ExceptionHandlingBehaviorenum. - Add public
ExceptionHandlingResultenum. - Add public
ProcessingOrderenum. - Add the internal static
PolicyProcessor.DefaultErrorSaverproperty. - Added the internal static
PolicyProcessor.CreateDefaultPolicyRule<T>method and thePolicyProcessor.DefaultPolicyRuleproperty. - Added the internal static
PolicyProcessor.CreateDefaultAsyncErrorSaver<T>method. - Add the internal static
PolicyProcessor.DefaultAsyncErrorSaverproperty. - Added the protected internal
PolicyProcessor.HandleException<T>method. - Added the protected internal
PolicyProcessor.HandleExceptionAsync<T>method. - SimplePolicyProcessor: Refactored catch-block handling into private methods across all
ExecuteandExecuteAsyncoverloads. - DefaultFallbackProcessor: Refactored catch-block handling into private methods across all
FallbackandFallbackAsyncoverloads. - Implement
ProcessingOrder.ProcessThenEvaluatepath inPolicyProcessor.HandleException. - Implement
ProcessingOrder.ProcessThenEvaluatepath inPolicyProcessor.HandleExceptionAsync. - Introduce
ExceptionFilter.IncludeError<TException>method overloads. - Introduce
ExceptionFilter.ExcludeError<TException>method overloads. - Introduce
ExceptionFilter.IncludeErrorandExcludeErrormethods acceptingExpression<Func<Exception, bool>>. - Introduce the
ExceptionFilter.ExcludeErrorSetmethod. - Introduce the
ExceptionFilter.IncludeErrorSetextension method. - Introduce the
ICanAddErrorFilter<T>.AddExceptionFilterextension method. - Use
ServiceOperationCanceledExceptionas the fallback exception inAggregateException.GetCancellationException. - Simplify cancellation-related
AggregateExceptionfiltering in synchronous policy processor methods to a singleCancellationToken.IsCancellationRequestedcheck. - Add
ConvertExceptionDelegates.TryAsExactstatic method to internalConvertExceptionDelegatesclass. - Introduce
ServiceOperationCanceledExceptionfor cancellation observed through a linked token when synchronously waiting on tasks. - Store
ServiceOperationCanceledExceptioninPolicyResult.PolicyCanceledErrorwhen cancellation is observed on a linked token during synchronous task waits in:SimplePolicyProcessor.Execute(all overloads)DefaultFallbackProcessor.Fallback(all overloads)
- Added
MethodImpl(MethodImplOptions.AggressiveInlining)toForSync,ForNotSync, andInitByConfigureAwaitmethods across bothPolicyResultandPolicyResult<T>. - Add
propagateCancellationparameter (default:true) to internalFuncExtensions.ToTaskReturnFuncoverloads. - Refactored internal
PolicyProcessorCatchBlockSyncHandler<T>to useShouldHandleExceptioninstead ofPreHandle, replacing the tuple return value with aHandleCatchBlockResultenum. - DRY refactor internal
DefaultErrorProcessorTclass. - Inline internal
IPolicyProcessor.AddExcludedErrorandAddIncludedErrorextensions. - Refactor
ErrorProcessorRegistrationmethods to use expression-bodied syntax. - Refactor
ICanAddErrorProcessormethods to use expression-bodied syntax. - Refactor
PolicyWrapperandPolicyWrapper<T>PolicyDelegateResultsproperties to use expression-bodied syntax. - Edit PoliNorError.Tests.csproj.
- Bump System.ValueTuple from 4.6.1 to 4.6.2
- Update NUnit to 4.5.1.
- Remove duplicated implementations in FuncEntensions.
- Deprecate the
PolicyProcessorCatchBlockHandlerBase<T>.PreHandlemethod. - Deprecate the
PolicyProcessorCatchBlockHandlerBase.PostHandlemethod. - Deprecate internal
FallbackFuncExecResult.FromErrorAndTokenoverloads. - Remove unused private
SimplePolicyProcessor.GetFilterUnsatisfiedOrFilterExceptionmethod - Add a 'Safeguarding Core Components' subsection to the 'Tips and Tricks' chapter in the README.
- Add ErrorProcessor usage example to "Error processors" README section.
- Eliminated closure allocations across all
Fallback,Retry, andExecutepolicy processor methods by introducing internal/private overloads that accept the originalAction<TParam>,Func<TParam, T>,Func<TParam, CancellationToken, Task>andFunc<TParam, CancellationToken, Task<T>>delegates directly. Applied these optimizations consistently to:DefaultRetryProcessor(sync and async variants, with and withoutRetryDelay/RetryCountInfo)DefaultFallbackProcessor(sync and async variants)SimplePolicyProcessor(sync and async execution paths)
- Add
DefaultRetryProcessorasync method overloads with requiredCancellationTokenparameter (noconfigureAwait), delegating to existing methods withconfigureAwaitset tofalse:RetryAsync<TParam>andRetryAsync<TParam, T>(with and withoutRetryDelay)RetryInfiniteAsync<TParam>andRetryInfiniteAsync<TParam, T>(with and withoutRetryDelay)RetryWithErrorContextAsync<TErrorContext>andRetryWithErrorContextAsync<TErrorContext, T>(with and withoutRetryDelay)RetryInfiniteWithErrorContextAsync<TErrorContext>andRetryInfiniteWithErrorContextAsync<TErrorContext, T>(with and withoutRetryDelay)
- Add
DefaultFallbackProcessorasync method overloads with requiredCancellationTokenparameter (noconfigureAwait), delegating to existing methods withconfigureAwaitset tofalse:FallbackAsync<TErrorContext>andFallbackAsync<TErrorContext, T>FallbackAsync<TParam>andFallbackAsync<TParam, T>
- Add
SimplePolicyProcessorasync method overloads with requiredCancellationTokenparameter (noconfigureAwait), delegating to existing methods withconfigureAwaitset tofalse:ExecuteAsync<TErrorContext>andExecuteAsync<TErrorContext, T>ExecuteAsync<TParam>andExecuteAsync<TParam, T>
- Introduce abstract
ErrorProcessor<TParam>with an overridableExecutemethod for parameter-aware error processing. - Introduce
void Policy.AddHandlerForPolicyResultextension method overloads. - Introduce an internal
PolicyResult.SetCanceledEarlymethod to markNoErrorastrueon early cancellation and apply it to all coreRetry,Fallback, andSimplepolicy processor methods. - Convert
SimplePolicyProcessor.AddErrorAndCatchBlockFilterErrorfrom a private method to an extension method on thePolicyResultclass. - Add internal
PolicyResult.ToLastPolicyResultStateextension method and refactor to useLastPolicyResultStateclass. - Refactor
PolicyProcessor.ExceptionFilterby extracting its logic into a new internalExceptionFilterSetclass. - DRY refactor
ConstantRetryDelay. - DRY refactor
ExponentialRetryDelay. - DRY refactor
LinearRetryDelay. - DRY refactor
TimeSeriesRetryDelay. - DRY refactoring of all internal
IPolicyProcessor.WithErrorContextProcessorOf<T, TErrorContext>extension methods to unify shared logic across their variousAction<Exception, ProcessingErrorInfo<TErrorContext>>overloads. - DRY refactoring of all internal
IPolicyProcessor.WithErrorContextProcessorOf<T, TErrorContext>extension methods to unify shared logic across their variousFunc<Exception, ProcessingErrorInfo<TErrorContext>, Task>overloads. - Refactor
PolicyDelegateCollectionResultBaseinternal constructor and add new tests forPolicyDelegateCollectionResult. - Update XML documentation for
ErrorProcessor.ProcessandErrorProcessor.ProcessAsyncto clarify that both methods directly callExecute. - Add
PolicyResult.WrappedStatuschecks to existing tests. - Add new tests for
RetryCountInfo. - Edit 'Error processors' README Chapter.
- Edit 'Retry-Then-Fallback' README chapter.
- Update
PolicyResultREADME Chapter. - Add THIRD-PARTY-NOTICES.
- Mark
PolicyResult.ChangeByRetryDelayResultas obsolete. - Rename
DefaultRetryProcessor.RetryOverloads.csfile toDefaultRetryProcessor.RetryOverloads.RetryDelay.cs. - Move all
DefaultRetryProcessor.Retry...methods that take anint retryCountparameter intoDefaultRetryProcessor.RetryOverloads.LimitedRetries.cs. - Move all
DefaultRetryProcessor.Retry…methods withRetryDelayandint retryCountparameters intoDefaultRetryProcessor.RetryOverloads.RetryDelay.LimitedRetries.cs. - Move all
DefaultRetryProcessormethods that useConfigureAwait(false)into the new filesDefaultRetryProcessor.RetryAsync.ConfigureAwaitFalse.csandDefaultRetryProcessor.RetryDelay.RetryAsync.ConfigureAwaitFalse.cs - Move non-interface
DefaultRetryProcessor Retry(Async)methods toDefaultRetryProcessor.RetryOverloads.cs.
- Introduced the
PolicyResult.WrappedStatusproperty and the enum-likeWrappedPolicyStatusclass, which encapsulate wrapped policy status values. - Introduced the
SimplePolicy.ThenFallbackmethod. - Introduced
Policy.AddHandlerForPolicyResultextension methods in the newPoliNorError.Extensions.PolicyResultHandlingnamespace. - Introduce abstract
ErrorProcessorclass withExecutemethod that implementors must override to define error processing logic. - Support cancellation via linked token in
FallbackPolicy.HandleAsyncandDefaultFallbackProcessor.FallbackAsyncoverloads. - Support cancellation via linked token in
FallbackPolicy.HandleandDefaultFallbackProcessor.Fallbackoverloads. - Support cancellation via linked token in
FallbackPolicy.Handle<T>andDefaultFallbackProcessor.Fallback<T>overloads. - Support cancellation via linked token in
FallbackPolicy.HandleAsync<T>andDefaultFallbackProcessor.FallbackAsync<T>overloads. - Support cancellation via linked token in
SimplePolicy.HandleAsyncandSimplePolicyProcessor.ExecuteAsyncoverloads. - Support cancellation via linked token in
SimplePolicy.HandleandSimplePolicyProcessor.Executeoverloads. - Support cancellation via linked token in
SimplePolicy.Handle<T>andSimplePolicyProcessor.Execute<T>overloads. - Support cancellation via linked token in
SimplePolicy.HandleAsync<T>andSimplePolicyProcessor.ExecuteAsync<T>overloads. - Support cancellation via linked token in
RetryPolicy.HandleAsyncandDefaultRetryProcessor.RetryAsyncoverloads. - Support cancellation via linked token in
RetryPolicy.HandleandDefaultRetryProcessor.Retryoverloads. - Support cancellation via linked token in
RetryPolicy.Handle<T>andDefaultRetryProcessor.Retry<T>overloads. - Support cancellation via linked token in
RetryPolicy.HandleAsync<T>andDefaultRetryProcessor.RetryAsync<T>overloads. - Support cancellation via linked token in the
BulkErrorProcessor.ProcessAsyncmethod. - Support cancellation via linked token in the
BulkErrorProcessor.Processmethod. - Add early return in
BulkErrorProcessor.Processforeach loop when cancellation occurs while processing the current error processor. - Supported cancellation via a linked token in the internal
IDelayProvider.BackoffSafelyAsyncextension method. - Supported cancellation via a linked token in the internal
IDelayProvider.BackoffSafelyextension method. - Introduced internal
IDelayProvider.DelayAndCheckIfResultFailedextension method to replace theIDelayProvider.BackoffSafelymethod. - Introduced internal
IDelayProvider.DelayAndCheckIfResultFailedAsycextension method to replace theIDelayProvider.BackoffSafelyAsyncmethod. - DRY refactoring of exception handling in
SimplePolicyProcessor.ExecuteAsyncandSimplePolicyProcessor.ExecuteAsync<T>via internalSimpleAsyncExceptionHandlerclass. - DRY refactoring of exception handling in
SimplePolicyProcessor.ExecuteandSimplePolicyProcessor.Execute<T>via internalSimpleSyncExceptionHandlerclass. - DRY refactoring of exception handling in
DefaultFallbackProcessor.FallbackandDefaultFallbackProcessor.Fallback<T>via internalSimpleSyncExceptionHandlerclass. - DRY refactoring of exception handling in
DefaultFallbackProcessor.FallbackAsyncandDefaultFallbackProcessor.FallbackAsync<T>via internalSimpleAsyncExceptionHandlerclass. - Refactor exception handling in
DefaultFallbackProcessor.Fallbackcatch block to mark the result as canceled only when the passed or linked token is canceled. - Refactor exception handling in
DefaultFallbackProcessor.FallbackAsynccatch block to mark the result as canceled only when the passed or linked token is canceled. - Refactor exception handling in
DefaultFallbackProcessor.Fallback<T>catch block to mark the result as canceled only when the passed or linked token is canceled. - Refactor exception handling in
DefaultFallbackProcessor.FallbackAsync<T>catch block to mark the result as canceled only when the passed or linked token is canceled. - Ensure
DefaultFallbackProcessor.FallbackAsync<T>returnsFallbackFuncExecResult<T>with result on success path (test correction). - Introduced internal
IDelayProvider.DelayAndCheckIfResultFailedextension method to replace theIDelayProvider.BackoffSafelymethod. - Introduced internal
IDelayProvider.DelayAndCheckIfResultFailedAsycextension method to replace theIDelayProvider.BackoffSafelyAsyncmethod. - Reduce allocations and GC load on each retry by using the
IDelayProvider.DelayAndCheckIfResultFailedmethod (stop usingBasicResultclass in retry processing). - Allows combining
DelayErrorProcessorwith error processors that support context. - Support safe enumeration of the library-internal collection
FlexSyncEnumerable<T>when accessed asynchronously. - Remove the extra check from the internal
PolicyResult.ChangeByHandleCatchBlockResultextension method and rename it toWasResultSetToFailureByCatchBlock. - Mark
IDelayProvider.BackoffSafelyandIDelayProvider.BackoffSafelyAsyncas obsolete. - Add
CatchBlockExceptiontoPolicyResult<T>.CatchBlockErrorswhen cancellation occurs in generic fallback function. - Add
CatchBlockExceptiontoPolicyResult.CatchBlockErrorswhen cancellation occurs in fallback function. - Add test to verify
PolicyResult<T>.CatchBlockErrorscontains exception when generic fallback function throws. - Add test to verify
PolicyResult.CatchBlockErrorscontains exception when fallback function throws. - Add XML summary comments for
BulkErrorProcessor. - Moved linked token cancellation tests into a single CancellationTests file.
- Update NUnit NuGet package to v4.4.0.
- Add 'Retry-Then-Fallback' README Chapter.
- Introduced the
RetryPolicy.ThenFallbackmethod that implements the retry-then-fallback pattern. - Introduced the PolicyResult.PolicyCanceledError property, which stores the
OperationCanceledExceptionwhen cancellation occurs. - Fix issue #150.
- Introduced
TimeSeriesRetryDelayclass - Introduced the
TimeSeriesRetryDelayOptionsclass and addedTimeSeriesto theRetryDelayTypeenum. - Made
DefaultFallbackProcessorimplement theICanAddErrorFilter<DefaultFallbackProcessor>interface. - Made
FallbackPolicyBaseimplement theICanAddErrorFilter<FallbackPolicyBase>interface. - Made
FallbackPolicyimplement theICanAddErrorFilter<FallbackPolicy>interface. - Made
FallbackPolicyWithAsyncFuncimplement theICanAddErrorFilter<FallbackPolicyWithAsyncFunc>interface. - Made
FallbackPolicyWithActionimplement theICanAddErrorFilter<FallbackPolicyWithAction>interface. - Made
SimplePolicyProcessorimplement theICanAddErrorFilter<SimplePolicyProcessor>interface. - Made
SimplePolicyimplement theICanAddErrorFilter<SimplePolicy>interface. - Introduced the
FallbackFuncsProvider.ToFallbackPolicymethod. - Prevent
NullReferenceExceptionwhen aFallbackPolicyBase- derived class is initialized byFallbackFuncsProvider. - Introduced the
BulkErrorProcessor.WithErrorContextProcessorOf<TErrorContext>(Func<Exception, ProcessingErrorInfo<TErrorContext>, CancellationToken, Task>)method. - Introduced the
BulkErrorProcessor.WithErrorContextProcessorOf<TErrorContext>(Action<Exception, ProcessingErrorInfo<TErrorContext>, CancellationToken>)method. - Introduced the
BulkErrorProcessor.WithErrorContextProcessorOf<TErrorContext>(Action<Exception, ProcessingErrorInfo<TErrorContext>>)extension method and its overloads. - Introduced the
BulkErrorProcessor.WithErrorContextProcessorOf<TErrorContext>(Func<Exception, ProcessingErrorInfo<TErrorContext>, Task>)extension method and its overloads. - Introduced the
BulkErrorProcessor.WithErrorContextProcessor<TErrorContext>(DefaultErrorProcessor<TErrorContext)method. - Introduced the
GetAttemptCount()extensions method forProcessingErrorInfo. - Introduced a
DelayErrorProcessorconstructor that accepts aRetryDelayparameter. - Add an internal extension method
GetCancellationException()forAggregateException. - Refactor
AddIncludedErrorFilterForAll<TException>extension methods forIEnumerable<IPolicyBase>. - Refactor
AddExcludedErrorFilterForAll<TException>extension methods forIEnumerable<IPolicyBase>. - Handle null comparison safely in
ErrorSetItem - Introduced the
IBulkErrorProcessor.WithDelayBetweenRetries(TimeSpan)extension method. - Prevent
NullReferenceExceptionwhenProcessingErrorContextparameter isnullinBulkErrorProcessor.Process(Async)methods. - Refactor internal extension method
ExceptionFilter.AddIncludedErrorSet. - Refactor internal extension method
ExceptionFilter.AddExcludedErrorSet. - Refactor how the error context processor is added to the policy processor in the
ErrorProcessorRegistrationclass. - Added internal
IPolicyResultHandlerCollectioninterface. - Deprecate the
BulkProcessStatusenum. - Edit 'RetryPolicy' README chapter.
- Edit 'Key Concepts' README Chapter.
- Add 'Tips and Tricks' README Chapter.
- Introduced the
RetryPolicy.Handle<TErrorContext>(Action, TErrorContext, CancellationToken)method. - Introduced the
RetryPolicy.Handle<TParam>(Action<TParam>, TParam, CancellationToken)method. - Introduced the
RetryPolicy.Handle<TErrorContext, T>(Func<T>, TErrorContext, CancellationToken)method. - Introduced the
RetryPolicy.Handle<TParam, T>(Func<TParam, T>, TParam, CancellationToken)method. - Introduced the
RetryPolicy.HandleAsync<TErrorContext>(Func<CancellationToken, Task>, TErrorContext, ... ,CancellationToken)method overloads. - Introduced the
RetryPolicy.HandleAsync<TParam>(Func<TParam, CancellationToken, Task>, TParam, ... ,CancellationToken)method overloads. - Introduced the
RetryPolicy.HandleAsync<TErrorContext, T>(Func<CancellationToken, Task<T>>, TErrorContext, ...,CancellationToken)method overloads. - Introduced the
RetryPolicy.HandleAsync<TParam, T>(Func<TParam, CancellationToken, Task<T>>, TParam, ... ,CancellationToken)method overloads. - Introduced the
IRetryExecutionInfointerface, which is implemented byRetryProcessingErrorInfoandRetryProcessingErrorInfo<TParam>. - Introduced the
GetRetryCount()extensions method forProcessingErrorInfo. - Introduced the
RetryPolicy.WithErrorContextProcessor<TErrorContext>(DefaultErrorProcessor<TErrorContext>)method. - Introduced the
RetryPolicy.WithErrorContextProcessorOf<TErrorContext>(Action<Exception, ProcessingErrorInfo<TErrorContext>>)method and its overloads. - Introduced the
RetryPolicy.WithErrorContextProcessorOf<TErrorContext>(Action<Exception, ProcessingErrorInfo<TErrorContext>, CancellationToken>)method. - Introduced the
RetryPolicy.WithErrorContextProcessorOf<TErrorContext>(Func<Exception, ProcessingErrorInfo<TErrorContext>, Task>)and its overloads. - Introduced the
RetryPolicy.WithErrorContextProcessorOf<TErrorContext>(Func<Exception, ProcessingErrorInfo<TErrorContext>, CancellationToken, Task>)method. - Added an optional bool excludeLastPolicy parameter (default:
false) to thePolicyCollection.AddPolicyResultHandlerForAll(Func<PolicyResult, CancellationToken, Task>, ...)method. - Added an optional bool excludeLastPolicy parameter (default:
false) to thePolicyCollection.AddPolicyResultHandlerForAll(Func<PolicyResult, Task>, CancellationType, ...)overloads. - Added an optional bool excludeLastPolicy parameter (default:
false) to thePolicyCollection.AddPolicyResultHandlerForAll<T>(Func<PolicyResult<T>, Task>, CancellationType, ...)overloads. - Added an optional bool excludeLastPolicy parameter (default:
false) to thePolicyCollection.AddPolicyResultHandlerForAll<T>(Action<PolicyResult<T>>, CancellationType, ...)overloads. - Added an optional bool excludeLastPolicy parameter (default:
false) to thePolicyCollection.AddPolicyResultHandlerForAll<T>(Func<PolicyResult<T>, CancellationToken, Task>, ...)method. - Added an optional bool excludeLastPolicy parameter (default:
false) to thePolicyCollection.AddPolicyResultHandlerForAll<T>(Action<PolicyResult<T>, CancellationToken>, ...)method. - Added an optional bool excludeLastPolicy parameter (default:
false) to thePolicyCollection.AddPolicyResultHandlerForAll(Action<PolicyResult, CancellationToken>, ...)method. - Add an internal
DelayErrorProcessorconstructor overload that accepts anIDelayProvider. - Introduced the
RetryDelay(Func<int, TimeSpan> delayValueProvider)constructor. - Introduced the
RetryDelay(RetryDelayOptions)constructor. - Added the protected
RetryDelay.DelayValueProviderproperty and deprecated theInnerDelayandInnerDelayValueProviderproperties. - Added the
ICanAddErrorFilter<T>interface and implemented it inRetryPolicyandDefaultRetryProcessor. - Introduced the
IBulkErrorProcessor.WithDelayBetweenRetries(Func<int,Exception, TimeSpan>)extension method. - Introduced the
TryCatchBuilder.AddCatchBlock(Func<IEmptyCatchBlockFilter, NonEmptyCatchBlockFilter>, IBulkErrorProcessor)method and deprecated theTryCatchBuilder.AddCatchBlock(Func<IEmptyCatchBlockFilter, NonEmptyCatchBlockFilter>, Action<IBulkErrorProcessor>)method. - Added the
ExceptionFilter.AppendFilter(ExceptionFilter)method. - DRY refactoring to add a policy result handler to
PolicyCollection. - Refactor
Policy.HandlePolicyResult(Async)methods. - Update
System.Memoryto version 4.0.5.0 in 'PoliNorError.Tests'. - Bump
System.Runtime.CompilerServices.UnsafeandSystem.Threading.Tasks.Extensionsin 'PoliNorError.Tests'. - Update 'RetryPolicy' README Chapter.
- Update NuGet package README.
- Introduced overloads of these methods, with and without the
RetryDelayparameter:DefaultRetryProcessor.RetryWithErrorContextAsync<TErrorContext>(Action, TErrorContext, ..., ..., CancellationToken)DefaultRetryProcessor.Retry<TParam>(Action<TParam>, TParam, RetryCountInfo, ..., CancellationToken)DefaultRetryProcessor.RetryInfiniteWithErrorContext<TErrorContext>(Action, TErrorContext, CancellationToken)DefaultRetryProcessor.RetryInfinite<TParam>(Action<TParam>, TParam, ..., CancellationToken)DefaultRetryProcessor.RetryWithErrorContextAsync<TErrorContext>(Func<CancellationToken, Task>, TErrorContext param, ..., ..., configureAwait, token)DefaultRetryProcessor.RetryAsync<TParam>(Func<TParam, CancellationToken, Task>, TParam, ..., ..., bool, CancellationToken)DefaultRetryProcessor.RetryInfiniteWithErrorContextAsync<TErrorContext>(Func<CancellationToken, Task>, TErrorContext, ..., bool, CancellationToken)DefaultRetryProcessor.RetryInfiniteAsync<TParam>(Func<TParam, CancellationToken, Task>, TParam, bool, CancellationToken)DefaultRetryProcessor.RetryWithErrorContext<TErrorContext, T>(Func<T> func, TErrorContext param, …, CancellationToken)DefaultRetryProcessor.Retry<TParam, T>(Func<TParam, T>, TParam, ..., CancellationToken)DefaultRetryProcessor.RetryInfiniteWithErrorContext<TErrorContext, T>(Func<T>, TErrorContext, CancellationToken)DefaultRetryProcessor.RetryInfinite<TParam, T>(Func<TParam, T>, TParam, CancellationToken)DefaultRetryProcessor.RetryWithErrorContextAsync<TErrorContext, T>(Func<CancellationToken, Task<T>>, TErrorContext, ..., bool, CancellationToken)DefaultRetryProcessor.RetryAsync<TParam, T>(Func<TParam, CancellationToken, Task<T>, TParam, ..., bool, CancellationToken)DefaultRetryProcessor.RetryInfiniteWithErrorContextAsync<TErrorContext, T>(Func<CancellationToken, Task<T>>, TErrorContext, ..., bool, CancellationToken)DefaultRetryProcessor.RetryInfiniteAsync<TParam, T>(Func<TParam, CancellationToken, Task<T>>, TParam, ..., bool, CancellationToken)
- Introduced the
DefaultRetryProcessor.WithErrorContextProcessorOf<TErrorContext>(Action<Exception, ProcessingErrorInfo<TErrorContext>, CancellationToken>)method. - Introduced the
DefaultRetryProcessor.WithErrorContextProcessor<TErrorContext>(DefaultErrorProcessor<TErrorContext>)method. - Introduced the
DefaultRetryProcessor.WithErrorContextProcessorOf<TErrorContext>(Func<Exception, ProcessingErrorInfo<TErrorContext>, CancellationToken, Task>)method. - Introduced the
DefaultRetryProcessor.WithErrorContextProcessorOf<TErrorContext>(Func<Exception, ProcessingErrorInfo<TErrorContext>, Task>)method overloads. - Refactor
DelayIfNeedandDelayIfNeedAsyncmethods inDefaultRetryProcessor. - Introduced the
TryCatchBuilder.AddCatchBlock(Func<IEmptyCatchBlockFilter, NonEmptyCatchBlockFilter>, Action<IBulkErrorProcessor)method. - Introduced the
RetryProcessingErrorInfo<TParam>class along with related internal classes. - Applied DRY refactoring to
DefaultRetryProcessor– added a lazily initialized privateDelayProviderproperty. - Applied DRY refactoring to
ExceptionFilter-dependent classes by adding theAddIncludedErrorFilter<TException>andAddExcludedErrorFilter<TException>methods. - Applied DRY refactoring to
ExceptionFilter- dependent classes by adding theAddIncludedInnerErrorFilter<TException>andAddExcludedInnerErrorFilter<TException>methods. - Bump Castle.Core from 5.1.1 to 5.2.1.
- Bump System.Runtime.CompilerServices.Unsafe and System.Threading.Tasks.Extensions.
- Bump System.Buffers from 4.6.0 to 4.6.1
- Update the 'Key Concepts' chapter in the README.
- Added a 'Key Concepts' section to the README.
- Introduced the
FallbackPolicyBase.Handle<TErrorContext>(Action, TErrorContext, CancellationToken)andFallbackPolicyBase.Handle<TParam>(Action<TParam>, TParam, CancellationToken)methods. - Introduced the
FallbackPolicyBase.Handle<TParam, T>(Func<TParam, T>, TParam, CancellationToken)andFallbackPolicyBase.Handle<TErrorContext, T>(Func<T> func, TErrorContext param, CancellationToken)methods. - Introduced overloads for the
FallbackPolicyBase.HandleAsync<TParam>andFallbackPolicyBase.HandleAsync<TErrorContext>methods. - Introduced overloads for the
FallbackPolicyBase.HandleAsync<TParam, T>andFallbackPolicyBase.HandleAsync<TErrorContext, T>methods. - Introduced the
WithErrorContextProcessor<TErrorContext>andWithErrorContextProcessorOf<TErrorContext>method overloads forFallbackPolicy,FallbackPolicyBase,FallbackPolicyWithAction, andFallbackPolicyWithAsyncFuncpolicies. - Introduced the
DefaultFallbackProcessor.Fallback<TErrorContext>(Action, TErrorContext, Action<CancellationToken>, CancellationToken)method. - Introduced the
DefaultFallbackProcessor.Fallback<TParam>(Action<TParam>, TParam, Action<CancellationToken>)method. - Introduced the
DefaultFallbackProcessor.Fallback<TErrorContext, T>(Func<T>, TErrorContext, Func<CancellationToken, T>)method. - Introduced the
DefaultFallbackProcessor.Fallback<TParam, T>(Func<TParam, T>, TParam, Func<CancellationToken, T>, CancellationToken)method. - Introduced the
DefaultFallbackProcessor.FallbackAsync<TErrorContext>(Func<CancellationToken, Task>, TErrorContext, Func<CancellationToken, Task>, bool, CancellationToken)method. - Introduced the
DefaultFallbackProcessor.FallbackAsync<TParam>(Func<TParam, CancellationToken, Task>, TParam, Func<CancellationToken, Task>, bool, CancellationToken)method. - Introduced the
DefaultFallbackProcessor.FallbackAsync<TErrorContext, T>(Func<CancellationToken, Task<T>>, TErrorContext, Func<CancellationToken, Task<T>>, bool, CancellationToken)method. - Introduced the
DefaultFallbackProcessor.FallbackAsync<TParam, T>(Func<TParam, CancellationToken, Task<T>>, TParam, Func<CancellationToken, Task<T>>, bool, CancellationToken)method. - Introduced the
WithErrorContextProcessor<TErrorContext>(DefaultErrorProcessor<TErrorContext>)method inDefaultFallbackProcessor. - Introduced the
DefaultFallbackProcessor.WithErrorContextProcessorOf<TErrorContext>method overloads. DefaultRetryProcessorrefactoring - make the field representing the retry policy rule static and simplifyRetryErrorContextcreation.- Apply the 'check reference equality instead' Rider rule to type comparisons in the
DefaultRetryProcessor.RetryInternal<T>method. - Update NuGet README.
- Updated 'Usage' in README for 2.20.0 changes.
- Update 'TryCatch' README Chapter.
- Update the Error processors chapter in the README.
- Add diagrams to README.
- Bump the nunit group with 7 updates.
- 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>>.InvokeWithTryCatchAsyncextension method. - Introduce
InvokeWithTryCatchAsyncextension methods overloads for theFunc<CancellationToken, Task<T>>,Func<CancellationToken, Task>delegates. - Introduce the
Func<CancellationToken, Task>.InvokeWithTryCatchAsyncextension method. - Introduce the
Func<T>.InvokeWithTryCatchextension method. - Introduce the
Action.InvokeWithTryCatchextension method. - Introduce
TryCatchBuilder.AddCatchBlockmethod overloads withNonEmptyCatchBlockFilter,IBulkErrorProcessorparameters. - Introduce the
TryCatchBuilder.AddCatchBlockmethod overload with theNonEmptyCatchBlockFilterparameter. - Introduce the
TryCatchBuilder.AddCatchBlockmethod overload with theIBulkErrorProcessorparameter. - Introduce
TryCatchBuilder.CreateFrommethod overload withNonEmptyCatchBlockFilter,IBulkErrorProcessorparameters. - Introduce the
TryCatchBuilder.CreateFrommethod overload with theNonEmptyCatchBlockFilterparameter. - Introduce the
TryCatchBuilder.CreateFrommethod overload with theIBulkErrorProcessorparameter. - Introduce shorthand
TryCatchBuilder.CreateAndBuildmethod without parameters. - Introduce shorthand
TryCatchBuilder.CreateAndBuildmethod with theIBulkErrorProcessorparameter - Introduce shorthand
TryCatchBuilder.CreateAndBuildmethod with theFunc<Exception, Task>parameter. - Introduce shorthand
TryCatchBuilder.CreateAndBuildmethod with theAction<Exception>parameter. - Deprecate the
BulkErrorProcessor(PolicyAlias)constructor. - Made
PolicyProcessorconstructors that use thePolicyAliasparameter and the_isPolicyAliasSetfield obsolete. - Call the
ConfigureAwaitmethod in theErrorProcessorBase.ProcessAsyncmethod with theconfigAwaitparameter passed. - Add the internal class
EmptyErrorContext<TParam>. - Add the
Policy.HasPolicyWrapperFactoryinternal property. - Add the Rider-related .gitignore.
- Edit 'Policy wrap' README Chapter.
- Update 'RetryPolicy' README Chapter and example in README for NuGet package.
- Bump the nunit group with 7 updates.
- Remove old references to NUnit-related nuget packages in the PoliNorError.Tests project file.
- Introduce
RetryPolicy.WithWait(DelayErrorProcessor)method. DefaultRetryProcessorrefactoring - add field representing retry policy rule.- Add the
RetryContext.IsZeroRetryproperty and use it to set thePolicyResult.NoErrorproperty to true. - Slightly improved performance for the
RetryPolicycustom error saver by passing theErrorContext<RetryContext>instead ofinttryCountarg in theDefaultRetryProcessor.SaveError(Async)methods. - Deprecate
ProcessingErrorContext.CurrentRetryCountproperty. - Introduce the
Policy.WrapPolicyCollectionextension method. - Argument exception guard clause for the
PolicyCollection.WrapUpmethod with theThrowOnWrappedCollectionFailed.Nonevalue for thethrowOnWrappedCollectionFailedparameter. - Argument exception guard clause for the
Policy.WrapPolicyCollectionmethod with theThrowOnWrappedCollectionFailed.Nonevalue for thethrowOnWrappedCollectionFailedparameter. - Made the
Policyclass constructorprotected(previouslyprivate protected). - Made the
cancellationTokenparameter optional inPolicyDelegate(<T>).HandleAsyncmethods. - Introduce
PolicyResultHandlerFailedException.Resultproperty. - Introduce
PolicyResultHandlerFailedException<T>exception. - Directly return Task instead of await when converting async uncancelable generic fallback delegate to cancelable with
CancellationType.Precancelableargument. - New tests for the
PolicyCollection.WrapUpmethod with theThrowOnWrappedCollectionFailed.CollectionErrorparameter. - New tests for a wrapped
SimplePolicythat wraps another policy. - Move the tests for the
RetryDelayclasses to a separate folder. - Add doc comments to the public members of the
PolicyBuildingclass. - Put the nuget README in the file.
- Update 'RetryPolicy' README Chapter.
- Correct retry terminology in README.
- Correct 'Error processors' README Chapters.
- Bump NSubstitute from 5.1.0 to 5.3.0.
- Bump System.Numerics.Vectors from 4.5.0 to 4.6.0.
- Bump System.Buffers from 4.5.1 to 4.6.0.
- Bump System.Runtime.CompilerServices.Unsafe from 6.0.0 to 6.1.0.
- Introduce
SlopeFactorforLinearRetryDelay. - Slightly improved performance for
RetryPolicyby removing the overhead of using theinttryCountargument in theDefaultRetryProcessor.DelayIfNeedAsync(Async)methods. - Introduce
PolicyCollection.WithRetry,PolicyCollection.WithInfiniteRetrymethods withRetryDelayparameter. - Introduce
PolicyDelegateCollection.WithRetry,PolicyDelegateCollection.WithInfiniteRetrymethods withRetryDelayparameter. - Introduce
PolicyDelegateCollection<T>.WithRetry,PolicyDelegateCollection<T>.WithInfiniteRetrymethods withRetryDelayparameter. - Introduce
RetryPolicy.SetPolicyResultFailedIfmethod overloads withAction<PolicyResult<T>>handler parameter forRetryPolicy,SimplePolicyandFallbackpolicies. - Move null guards before getting a fallback delegate in
FallbackPolicyBase. - Remove deprecated suppression for
PolicyResultHandlingException. - Add doc comments to the public members of the
PolicyDelegateandPolicyDelegate<T>classes. - Add doc comments to the public members of the
PolicyDelegateResultandPolicyDelegateResult<T>classes. - Add doc comments to the public members of the
PolicyResultandPolicyResult<T>classes, and to thePolicyResultFailedReasonenum. - Update 'Calling Func and Action delegates in a resilient manner' README Chapter.
- Update 'RetryPolicy' README Chapter.
- Introduce
Policyerror filtering extension methods in thePoliNorError.Extensions.PolicyErrorFilteringnamespace. - Fix issue #126 by using the
IDelayProvider.BackoffBackoffSafely(Async)extension methods. - Introduce
Action.InvokeWithRetryDelayextension methods. - Introduce
Action.InvokeWithRetryDelayInfiniteextension methods. - Introduce
Func<CancellationToken, Task>.InvokeWithRetryDelayAsyncextension methods. - Introduce
Func<CancellationToken, Task>.InvokeWithRetryDelayInfiniteAsyncextension methods. - Introduce
Func<T>.InvokeWithRetryDelayextension methods. - Introduce
Func<T>.InvokeWithRetryDelayInfiniteextension methods. - Introduce
Func<CancellationToken, Task<T>>.InvokeWithRetryDelayAsyncextension methods. - Introduce
Func<CancellationToken, Task<T>>.InvokeWithRetryDelayInfiniteAsyncextension methods. - Add early return in
RetryProcessor.Retry(Async)(<T>)methods if token is already canceled. - DRY Refactoring of the use of
RetryDelayinDefaultRetryProcessormethods. - Refactor catch block exception handling in
DefaultRetryProcessor.Retry(Async)<T>methods. - Add 'Try', 'Catch' tags to nuget package.
- Update 'RetryPolicy' README Chapter.
- Add doc comments to
CatchBlockExceptionSource. - Bump NUnit from 4.1.0 to 4.2.1.
- Bump NUnit from 4.2.1 to 4.2.2.
- Introduce jittering for
RetryDelaysubclasses, adapted from Polly. - Introduce
RetryDelayOptions.MaxDelayproperty. - Introduce
Createstatic methods forConstantRetryDelay,LinearRetryDelay,ExponentialRetryDelayclasses. - Bump NUnit3TestAdapter from 4.5.0 to 4.6.0 in the nunit group.
- Add the
RetryDelayclass and its subclasses(ConstantRetryDelay,LinearRetryDelay,ExponentialRetryDelay). - Change
RetryPolicyctor signature to accept theRetryDelayparameter. - Add the
RetryDelayparameter to theRetryPolicy.InfiniteRetriesmethod overloads. - Modify
RetryPolicy.Handle(Async)<T>methods to use theRetryDelay. - Add
DefaultRetryProcessor.Retrymethod overloads andRetryInfinitemethod to handleActionwithRetryDelayparameter. - Add
DefaultRetryProcessor.Retry<T>method overloads andRetryInfinite<T>method to handleFunc<T>withRetryDelayparameter. - Add
DefaultRetryProcessor.RetryAsyncmethod overloads andRetryInfiniteAsyncmethod to handleFunc<CancellationToken, Task>withRetryDelayparameter. - Add
DefaultRetryProcessor.RetryAsync<T>method overloads andRetryInfiniteAsync<T>method to handleFunc<CancellationToken, Task<T>>withRetryDelayparameter. - Add internal
DelayProviderclass. - Refactoring to use the
DelayProviderclass in theDelayErrorProcessorclass. - Introduce
RetryProcessingErrorInfoclass, addProcessingErrorInfo.CurrentContextproperty, deprecateProcessingErrorInfo.CurrentRetryCountproperty. - DRY refactoring and new tests for
RetryPolicy.WithWaitmethod overloads. - Add doc comments to
IRetryProcessorclass. - Add doc comments to
RetryCountInfoOptionsclass andRetryCountInfostruct. - Update 'RetryPolicy' README Chapter.
- Update 'TryCatch' README Chapter.
- Introduce the
NonEmptyCatchBlockFilter.ExcludeErrorSet,NonEmptyCatchBlockFilter.IncludeErrorSetmethods. - Introduce the
CatchBlockHandlerFactory.FilterExceptionsByIncluding(IErrorSet),CatchBlockHandlerFactory.FilterExceptionsByExcluding(IErrorSet)methods. - DRY refactoring of the method that gets the
IsErrorproperty of theTryCatchResultandTryCatchResult<T>classes. - Remove redundant
IErrorsAggregator<T>,IErrorsToStringAggregatorinterfaces,DefaultErrorsToStringAggregatorclass, internalProcessingErrorContextconstructor. - Remove unnecessary value assignment (IDE0059) in tests.
- Add doc comments to
IErrorSetinterface andErrorSetclass.
- For
CatchBlockFilter,NonEmptyCatchBlockFilterclasses. addExcludeError,IncludeErrorfluent methods overloads for inner exception types. - For
NonEmptyCatchBlockFilterclass, addCreateByIncluding,CreateByExcludingfluent methods overloads with possibility to add inner exception types. - Introduce
NonEmptyCatchBlockFilter.CreateByIncluding(IErrorSet),NonEmptyCatchBlockFilter.CreateByExcluding(IErrorSet) static methods. - For
FallbackFuncsProviderclass, add protectedSetFallbackAction,SetAsyncFallbackFuncmethods withCancellationTypeparam. - Directly return
Taskinstead of await when converting async uncancelable non-generic delegate to precancelable when registeringPolicyResulthandler withCancellationType.Precancelableargument. - Directly return
Taskinstead of await when converting async uncancelable non generic fallback delegate to cancelable withCancellationType.Precancelableargument. - Throw a
NotImplementedExceptionexception in thePolicyResult.SetErrorsprotected method. - DRY refactoring for
IncludeError,ExcludeErrormethods ofCatchBlockFilter,NonEmptyCatchBlockFilterclasses. - Update 'FallbackPolicy' README Chapter.
- Update 'Error filters' README Chapter.
- Update 'TryCatch' README Chapter.
- Introduce the
FromInnerError,WithInnerErrormethods of theErrorSetclass. - Introduce
TryCatchResult(<T>).IsSuccessproperty. - Directly return
Taskinstead of await in asynchronous error processing scenarios with theCancellationType.Precancelableargument. - Use
Task.GetAwaiter().GetResult()instead of theTask.Waitmethod in sync-over-async error processing scenarios with theCancellationType.Precancelableargument. - Remove the obsolete
ProcessingErrorContext.FromRetrymethod. - Add README main content.
- Update 'PolicyResult' README Chapter.
- Introduce
IncludeErrorSet(IErrorSet),ExcludeErrorSet(IErrorSet)methods forPolicyCollection. - Introduce
IncludeErrorSet(IErrorSet)andExcludeErrorSet(IErrorSet)extension methods for thePolicyDelegateCollection(<T>)classes. - Introduce the
TryCatchBaseclass and theITryCatch<T>interface for dependency injection scenarios. - Introduce
ITryCatch.HasCatchBlockForAllproperty. - Dispose of
CancellationTokenSourceobjects in tests where it was absent. - Add code coverage badge.
- Update 'Error filters' README Chapter.
- Update 'TryCatch' README Chapter.
- Introduce
IErrorSetinterface andErrorSetclass. - Introduce
IncludeErrorSet(IErrorSet),ExcludeErrorSet(IErrorSet)extension methods for policy processors. - Introduce
IncludeErrorSet(IErrorSet),ExcludeErrorSet(IErrorSet)extension methods for library policies (RetryPolicy,SimplePolicyandFallbackPolicy). - Add the
ITryCatch.ExecuteAsyncextension methods with theconfigureAwait= false parameter. - Introduce
TryCatchResultBase.ExceptionHandlerIndexproperty. - Improve conversion of
PolicyResult(<T>)class toTryCatchResult(<T>)class. - Add 'TryCatch' README Chapter.
TryCatch/TryCatchBuilderclasses now support more than twoCatchBlockHandlers.
- Introduce the
TryCatchclass, which implements theITryCatchinterface with methods for executing sync or async, generic or non-generic delegates that returnTryCatchResult(<T>)class (no more than twoCatchBlockHandlersupported so far). - Introduce the
ITryCatchBuilderinterface andTryCatchBuilderclass. - Add
NonEmptyCatchBlockFilter.ToCatchBlockHandlerandCatchBlockForAllHandler.ToTryCatchmethods. - Add
ToTryCatchBuilderandToTryCatchextension methods to theCatchBlockFilteredHandlerclass. - Add CODE_COVERAGE.md.
- Update 'Calling Func and Action delegates in a resilient manner' README Chapter.
- Hotfix introducing new
CatchBlockHandlerFactoryclass to prevent inconsistent creation ofCatchBlockHandlersubclasses.
- Introduce the
CatchBlockHandlerclass and theCatchBlockFilteredHandlerandCatchBlockForAllHandlersubclasses. - Introduce new
InvokeWithSimple(Async)extension methods with aCatchBlockHandlerparameter for non-generic delegates. - Introduce new
InvokeWithSimple(Async)<T>extension methods with aCatchBlockHandlerparameter for generic delegates. - Introduce the
NonEmptyCatchBlockFilterclass. - Add the
RetryProcessingErrorInfoandRetryProcessingErrorContextclasses to process exceptions by a retry processor in a more object-oriented way. - Add
CatchBlockFilter.Empty()static method. - Upgrade tests to NUnit.4.1.0.
- Update 'Calling Func and Action delegates in a resilient manner' README Chapter.
- Update 'SimplePolicy' README Chapter.
- Add
CatchBlockFilterclass and use it in theSimplePolicyProcessorclass. - Introduce new
Action.InvokeWithSimpleextension method with anCatchBlockFilterparameter. - Introduce new
Func<CancellationToken, Task>.InvokeWithSimpleAsyncextension method with anCatchBlockFilterparameter. - Introduce new
Func<T>.InvokeWithSimpleextension method with anCatchBlockFilterparameter. - Introduce new
Func<CancellationToken, Task<T>>.InvokeWithSimpleAsync<T>extension methods with anCatchBlockFilterparameter. - Delegates, when included as part of
PolicyDelegatein a collection, are handled error-free even if a policy rethrows an exception. - Set the
PolicyResult.ErrorFilterUnsatisfiedproperty totruewhen a delegate is handled as part of aPolicyDelegateby thePolicyDelegateCollection(T)and an exception is rethrown because the error filter is not satisfied. - Force the non-generic async fallback delegate converted from
Func<Task>to throwOperationCanceledExceptionif cancellation has already occurred. - Rename the incorrect filename PolicyProcessorTests.cs to ExceptionFilterTests.cs.
- Introduce
IncludeInnerError<TInnerException>andExcludeInnerError<TInnerException>methods forPolicyCollection. - Introduce
IncludeInnerError<TInnerException>andExcludeInnerError<TInnerException>methods for thePolicyDelegateCollectionandPolicyDelegateCollection<T>classes. - Introduce
FallbackFuncsProviderclass. - New constructors for
FallbackPolicyclasses that accept theFallbackFuncsProviderparameter. - Introduce
PolicyCollection.WithFallback(FallbackFuncsProvider)method. - Add
PolicyCollection.WithFallbackoverloaded methods withonlyGenericFallbackForGenericDelegateparameter. - Refactor the constructors of
FallbackPolicyclasses to accept the newonlyGenericFallbackForGenericDelegateparameter. - Improved performance for
FallbackPolicy, since no moreExpressions are used to store generic fallback functions. - Made
SimplePolicyProcessorandSimplePolicyrethrow exception if error filter is unsatisfied. - Minimize the number of calls to the
Expression.Compilemethod in thePolicyProcessor.ExceptionFilterclass. - Fix issue #93.
- Introduce
PolicyResult.FailedHandlerIndexproperty. - Made
SimplePolicyProcessorclass sealed. - Update 'Error processors' README Chapter.
- Add doc comments to
IBulkErrorProcessor,IFallbackProcessorinterfaces andFallbackPolicyclass.
- Introduce
SetPolicyResultFailedIf(<T>)methods for thePolicyCollectionand thePolicyDelegateCollection(<T>)classes. - Introduce
IncludeInnerError<TInnerException>andExcludeInnerError<TInnerException>methods for policy processors and library policies(RetryPolicy,SimplePolicyandFallbackPolicy). - Cross-synchronisation support for invoking a non-generic fallback delegate when a generic one is not set.
- Reduce allocations by using only a single instance of the
RetryErrorContextclass in Retry processing. - Add
Apply<T>extension method toAction<T>delegate. - Correct the doc comments for the
SetPolicyResultFailedIfInnermethods of the library policies. - Update 'PolicyResult handlers' README Chapter.
- Introduce
WithInnerErrorProcessorOf<TException>overloaded methods for policy processor interfaces,BulkErrorProcessor, library policies(RetryPolicy,SimplePolicyandFallbackPolicy),PolicyDelegateCollection(<T>)andPolicyCollection. - Introduce
SetPolicyResultFailedIf(<T>)methods for library policies(RetryPolicy,SimplePolicyandFallbackPolicy).
- Introduce
IncludeErrorSet<TException1, TException2>andExcludeErrorSet<TException1, TException2>extension methods for thePolicyDelegateCollection(<T>)classes. - Introduce
PolicyResult(<T>).CriticalErrorproperty. - Introduce
PolicyResultHandlingException.HandlerIndexproperty. - Fix issue (#83): the
PolicyResulthandler index in the collection should be correct when adding generic and non generic handlers consecutively. - Upgrade tests to Nunit 4.0.1.
- Update 'Error filters' README Chapter.
- Edit 'PolicyResult handlers' README Chapter.
- Edit 'PolicyDelegateCollection' README Chapter.
- Correct 'Policy wrap' README Chapter example.
- Introduce
IncludeErrorSet<TException1, TException2>methods for policy processors, library policies(RetryPolicy,SimplePolicyandFallbackPolicy) andPolicyCollection. - Introduce
ExcludeErrorSet<TException1, TException2>methods for policy processors, library policies(RetryPolicy,SimplePolicyandFallbackPolicy) andPolicyCollection. - Slightly improve performance by using the equality operator instead of the
Equalsmethod for comparing types in generic error filters. - Add new 'PolicyDelegateCollectionResult' README chapter.
- Update examples in the 'Policy wrap' README chapter.
- Add docs for the
ExcludeError,IncludeErrorextension methods in theRetryProcessorErrorFiltering,FallbackProcessorErrorFiltering,SimplePolicyProcessorErrorFilteringclasses.
- Introduce
PolicyCollection.ExcludeErrorForLast,PolicyCollection.IncludeErrorForLastextension methods. - Introduce
PolicyDelegateCollection(<T>).ExcludeErrorForLast,PolicyDelegateCollection<T>.IncludeErrorForLastextension methods. - Introduce
PolicyDelegateCollectionResult(<T>).IsCanceledproperty. - The condition that the
PolicyDelegateCollectionResult(<T>).IsSuccessproperty be true was reinforced by the condition that theIsFailedandIsCanceledproperties be both equal false. - The condition that the property
PolicyDelegateCollectionResult<T>.Resultnot be equal todefaultwas strengthened by the condition that theIsSuccessproperty be true. - 'The 'PolicyDelegateCollection' chapter in the README was rewritten.
- Introduce
PolicyDelegateCollection(<T>).WithErrorProcessorOfandPolicyDelegateCollection(<T>).WithErrorProcessorextension methods. - Introduce
PolicyCollection.WithErrorProcessorOfandPolicyCollection.WithErrorProcessorextension methods. - Fix issue (#61): the handling of a
PolicyDelegateCollectionshould fail fast when the collection was obtained from aPolicyCollectionand the delegate is null. - Fix the oversight related to cancellation in the
PolicyDelegatesHandler.HandleAllBySyncTypemethod. - DRY refactoring for extension methods adding filters to a
IPolicyDelegateCollection.
- Support a fluent interface for the
IBulkErrorProcessorinterface. - Introduce default constructor for the
BulkErrorProcessorclass. - Introduce
PolicyResult.IsPolicySuccessproperty. - Fix issue (#50) with the
PolicyResult(<T>).WrappedPolicyResultsproperty being empty when a wrappedPolicyCollection(<T>)didn't handle delegate. - Reduce allocations by using only a single instance of the
EmptyErrorContextclass when processing Simple and Fallback policies. - Add the marker
ICanAddErrorProcessorinterface.
- Introduce
PolicyCollection.WrapUpmethod. - Introduce
Policy.ResetWrapmethod. - Fix issue (#43) when the
PolicyResult.SetFailedmethod is not called in a policy result handler due to previous cancellation. - Add
PolicyDelegateCollection(<T>).WithThrowOnLastFailedextensions methods withFunc<IEnumerable<PolicyDelegateResult(<T>)>, Exception>as a parameter. - The
PolicyDelegateCollectionResult'sIsFailedandIsSuccessproperties are set once in the constructor now. - Add
PolicyDelegateResult(<T>).IsCanceledandPolicyDelegateResult(<T>).Errorsproperties. - Remove redundant
PolicyDelegateCollectionException- related internal classes.
- Add
IPolicyDelegateCollection(<T>).AddPolicyResultHandlerForLastandPolicyCollection.AddPolicyResultHandlerForLastmethods. - Add
PolicyDelegateResult(<T>).IsFailed,PolicyDelegateCollectionResult(<T>).IsFailedproperties. - Add
PolicyDelegateResult(<T>).IsSuccess,PolicyDelegateCollectionResult(<T>).IsSuccessproperties. - Add
IPolicyBase.WrapUpextension method. - Changes that are non-breaking in the signature of
PolicyCollection.HandleDelegate(Async)(<T>)methods and add documentation. PolicyDelegateResult(<T>)classes' constructors were made internal.PolicyDelegateCollectionResult(<T>)classes' constructors were internal.- Get rid of 'Moq' in tests.
- Reduce parameter passing overhead for policy processors.
- Fix two issues related to cancellation when handling the
PolicyDelegateCollection(<T>)(#4, #11). - Fix bug that caused a generic policy result handler to throw an exception when the delegate return type was different than the type of handler(#5).
- Fix the bug with an unhandled exception if the error filter throws(#19) and add new enum member
CatchBlockExceptionSource.ErrorFilter. - Some methods of
IPolicyDelegateCollection (<T>)are now extensions methods. - DRY refactoring for policies and policy processors.
- Rename the
ErrorProcessorDelegateclass toErrorProcessorParam. - Add the
RetryErrorSaverParamclass and use it in theDelegateInvoking(T)andPolicyDelegateCollectionRegistrarclasses for extensions methods. - Rename the
PolicyDelegateBase.UseSyncproperty toSyncType. - Support not cancelable
PolicyResulthandlers for policies,PolicyCollectionandPolicyDelegateCollection(<T>)classes. - Add new
WithErrorProcessorOfextensions methods toIPolicyProcessorandIPolicyBaseinterfaces. - The existed
DefaultErrorProcessorclass was renamed toBasicErrorProcessor, the newDefaultErrorProcessorwas added. - Rename the
ConvertToCancelableFuncTypeenum toCancellationType. - Some classes for extensions methods was renamed, splitted or dropped.
- Add new
UseCustomErrorSavermethod to theIRetryProcessorinterface. - Add
IRetryProcessor.UseCustomErrorSaverOf(...)extensions methods. - Add
RetryPolicy.UseCustomErrorSaverOfextensions methods. - Refactor
IPolicyProcessor.WithErrorProcessorOf<T>(...)overloaded methods. - Rename
CatchBlockException.ProcessExceptionproperty toProcessingException. - Add
CatchBlockException.ExceptionSourceproperty. - Change
IPolicyDelegateCollectionHandler<T>.HandleAsyncmethods signature. - Rename
ProcessErrorInfoclass toProcessingErrorInfo. - Change the method signature of the interfaces
IErrorProcessorandIBulkErrorProcessor. - Add
PolicyResult.PolicyNameproperty. - Add
PolicyResult<T>.WrappedPolicyResultsproperty. - Made
GetResults()method fromPolicyDelegateCollectionException.ErrorResultsproperty.
- Made
PolicyResult(<T>)static creation methods internal. - Add new
PolicyResult.ErrorsNotUsedproperty. - Extract the handling of
PolicyDelegateCollection(<T>)into the new interfacesIPolicyDelegateCollectionHandler(<T>). - Add
IPolicyProcessor.WithErrorProcessorgeneric extension method. - Add
IPolicyDelegateCollection(<T>).HandleAll(Async)extensions methods. - Add
PolicyCollection.BuildCollectionHandlerFormethods andPolicyCollection.HandleDelegate(Async)extensions methods. - Refactor the
CatchBlockProcessErrorInfoclass and rename it toProcessErrorInfo. - Rename
InvokeParamsclass toErrorProcessorDelegate.
- Introduce
PolicyResult.UnprocessedErrorproperty. - Remove
PolicyDelegateCollectionBase<T>.LastPolicyDelegateproperty. - Made
IPolicyBase.ToPolicyDelegateextension methods without delegate param internal. - Made
IHandlerRunnerBaseinterface and its inheritors internal. - Change the accessibility of all
IPolicyBaseExtensionserror filter related extension methods to internal. - Change the accessibility of all
IPolicyProcessorExtensionserror filter related extension methods to internal. - Drop redundant
ICanAddPolicyResultHandler<T>interface.
- Introduce
PolicyCollectinclass. - More robust
PolicyDelegateCollection(<T>)creation. - All
PolicyDelegateCollection(<T>)creation methods are namedCreate. - Drop
PolicyDelegateCollection(<T>).SetCommonDelegatemethod. - New public
RetryPolicy.RetryInfoproperty. - Made
PolicyResult<T>.SetResultmethod internal. - Add
PolicyResult.FailedReasonproperty. - Add
AddPolicyResultHandler<T>,AddPolicyResultHandlerForAll<T>methods for handlingPolicyResult<T>. - Add
PolicyDelegateCollectionResult(<T>).LastPolicyResultproperty. - Drop
PolicyDelegateCollectionResult.LastFailedErrorproperty.
- Add
SimplePolicy-related methods to extensions methods for delegates. IPolicyProcessornow has anErrorFilterproperty. Methods that add filters were removed.- Fix
PolicyDelegateCollectionExtensions.WithFallbackmethod signature - Change the name of the
PolicyResult.IsOkproperty toNoError.
- Introduce
SimplePolicyandSimplePolicyProcessorclasses - Drop the
PolicyDelegateCollection(<T>).WithCommonResultErrorsHandlermethod - Alter the name of the policy
WithPolicyResultHandlermethod toAddPolicyResultHandler - Change the name of the
PolicyDelegateCollection(<T>).WithCommonDelegatemethods toSetCommonDelegate - Policy
ForErrormethods were renamed toIncludeError - Rename
PolicyDelegateCollection(<T>).WithCommonResultHandlertoAddPolicyResultHandlerForAll - Rename
PolicyDelegateCollection(<T>).ForErrormethods toIncludeErrorForAll PolicyDelegateCollection(<T>).ExcludeErrormethods was renamed toExcludeErrorForAll- Get rid of
RetryErrorProcessor,FallbackErrorProcessorclasses. - Rename the
PolicyHandledResultandPolicyHandledInfoclasses (nowPolicyDelegateResultandPolicyDelegateInforespectively) and the related classes. - The name of the
PolicyDelegateCollection(T>)creation methods is started with theCreateprefix.
- Reduce the number of public classes and methods that are made internal.
- Fix not correct IntelliSense order for RetryPolicy ctors (Issue #1)
- Fix bug with empty HandleResultErrors (Issue #2)