- 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. - 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.
- 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. DefaultRetryProcessor
refactoring - add field representing retry policy rule.- Add the
RetryContext.IsZeroRetry
property and use it to set thePolicyResult.NoError
property to true. - Slightly improved performance for the
RetryPolicy
custom error saver by passing theErrorContext<RetryContext>
instead ofint
tryCount
arg in theDefaultRetryProcessor.SaveError(Async)
methods. - Deprecate
ProcessingErrorContext.CurrentRetryCount
property. - Introduce the
Policy.WrapPolicyCollection
extension method. - Argument exception guard clause for the
PolicyCollection.WrapUp
method with theThrowOnWrappedCollectionFailed.None
value for thethrowOnWrappedCollectionFailed
parameter. - Argument exception guard clause for the
Policy.WrapPolicyCollection
method with theThrowOnWrappedCollectionFailed.None
value for thethrowOnWrappedCollectionFailed
parameter. - Made the
Policy
class constructorprotected
(previouslyprivate protected
). - Made the
cancellationToken
parameter optional inPolicyDelegate(<T>).HandleAsync
methods. - Introduce
PolicyResultHandlerFailedException.Result
property. - Introduce
PolicyResultHandlerFailedException<T>
exception. - Directly return Task instead of await when converting async uncancelable generic fallback delegate to cancelable with
CancellationType.Precancelable
argument. - New tests for the
PolicyCollection.WrapUp
method with theThrowOnWrappedCollectionFailed.CollectionError
parameter. - New tests for a wrapped
SimplePolicy
that wraps another policy. - Move the tests for the
RetryDelay
classes to a separate folder. - Add doc comments to the public members of the
PolicyBuilding
class. - 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
SlopeFactor
forLinearRetryDelay
. - Slightly improved performance for
RetryPolicy
by removing the overhead of using theint
tryCount
argument in theDefaultRetryProcessor.DelayIfNeedAsync(Async)
methods. - Introduce
PolicyCollection.WithRetry
,PolicyCollection.WithInfiniteRetry
methods withRetryDelay
parameter. - Introduce
PolicyDelegateCollection.WithRetry
,PolicyDelegateCollection.WithInfiniteRetry
methods withRetryDelay
parameter. - Introduce
PolicyDelegateCollection<T>.WithRetry
,PolicyDelegateCollection<T>.WithInfiniteRetry
methods withRetryDelay
parameter. - Introduce
RetryPolicy.SetPolicyResultFailedIf
method overloads withAction<PolicyResult<T>>
handler parameter forRetryPolicy
,SimplePolicy
andFallback
policies. - Move null guards before getting a fallback delegate in
FallbackPolicyBase
. - Remove deprecated suppression for
PolicyResultHandlingException
. - Add doc comments to the public members of the
PolicyDelegate
andPolicyDelegate<T>
classes. - Add doc comments to the public members of the
PolicyDelegateResult
andPolicyDelegateResult<T>
classes. - Add doc comments to the public members of the
PolicyResult
andPolicyResult<T>
classes, and to thePolicyResultFailedReason
enum. - Update 'Calling Func and Action delegates in a resilient manner' README Chapter.
- Update 'RetryPolicy' README Chapter.
- Introduce
Policy
error filtering extension methods in thePoliNorError.Extensions.PolicyErrorFiltering
namespace. - Fix issue #126 by using the
IDelayProvider.BackoffBackoffSafely(Async)
extension methods. - Introduce
Action.InvokeWithRetryDelay
extension methods. - Introduce
Action.InvokeWithRetryDelayInfinite
extension methods. - Introduce
Func<CancellationToken, Task>.InvokeWithRetryDelayAsync
extension methods. - Introduce
Func<CancellationToken, Task>.InvokeWithRetryDelayInfiniteAsync
extension methods. - Introduce
Func<T>.InvokeWithRetryDelay
extension methods. - Introduce
Func<T>.InvokeWithRetryDelayInfinite
extension methods. - Introduce
Func<CancellationToken, Task<T>>.InvokeWithRetryDelayAsync
extension methods. - Introduce
Func<CancellationToken, Task<T>>.InvokeWithRetryDelayInfiniteAsync
extension methods. - Add early return in
RetryProcessor.Retry(Async)(<T>)
methods if token is already canceled. - DRY Refactoring of the use of
RetryDelay
inDefaultRetryProcessor
methods. - 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
RetryDelay
subclasses, adapted from Polly. - Introduce
RetryDelayOptions.MaxDelay
property. - Introduce
Create
static methods forConstantRetryDelay
,LinearRetryDelay
,ExponentialRetryDelay
classes. - Bump NUnit3TestAdapter from 4.5.0 to 4.6.0 in the nunit group.
- Add the
RetryDelay
class and its subclasses(ConstantRetryDelay
,LinearRetryDelay
,ExponentialRetryDelay
). - Change
RetryPolicy
ctor signature to accept theRetryDelay
parameter. - Add the
RetryDelay
parameter to theRetryPolicy.InfiniteRetries
method overloads. - Modify
RetryPolicy.Handle(Async)<T>
methods to use theRetryDelay
. - Add
DefaultRetryProcessor.Retry
method overloads andRetryInfinite
method to handleAction
withRetryDelay
parameter. - Add
DefaultRetryProcessor.Retry<T>
method overloads andRetryInfinite<T>
method to handleFunc<T>
withRetryDelay
parameter. - Add
DefaultRetryProcessor.RetryAsync
method overloads andRetryInfiniteAsync
method to handleFunc<CancellationToken, Task>
withRetryDelay
parameter. - Add
DefaultRetryProcessor.RetryAsync<T>
method overloads andRetryInfiniteAsync<T>
method to handleFunc<CancellationToken, Task<T>>
withRetryDelay
parameter. - Add internal
DelayProvider
class. - Refactoring to use the
DelayProvider
class in theDelayErrorProcessor
class. - Introduce
RetryProcessingErrorInfo
class, addProcessingErrorInfo.CurrentContext
property, deprecateProcessingErrorInfo.CurrentRetryCount
property. - DRY refactoring and new tests for
RetryPolicy.WithWait
method overloads. - Add doc comments to
IRetryProcessor
class. - Add doc comments to
RetryCountInfoOptions
class andRetryCountInfo
struct. - Update 'RetryPolicy' README Chapter.
- Update 'TryCatch' README Chapter.
- Introduce the
NonEmptyCatchBlockFilter.ExcludeErrorSet
,NonEmptyCatchBlockFilter.IncludeErrorSet
methods. - Introduce the
CatchBlockHandlerFactory.FilterExceptionsByIncluding(IErrorSet)
,CatchBlockHandlerFactory.FilterExceptionsByExcluding(IErrorSet)
methods. - DRY refactoring of the method that gets the
IsError
property of theTryCatchResult
andTryCatchResult<T>
classes. - Remove redundant
IErrorsAggregator<T>
,IErrorsToStringAggregator
interfaces,DefaultErrorsToStringAggregator
class, internalProcessingErrorContext
constructor. - Remove unnecessary value assignment (IDE0059) in tests.
- Add doc comments to
IErrorSet
interface andErrorSet
class.
- For
CatchBlockFilter
,NonEmptyCatchBlockFilter
classes. addExcludeError
,IncludeError
fluent methods overloads for inner exception types. - For
NonEmptyCatchBlockFilter
class, addCreateByIncluding
,CreateByExcluding
fluent methods overloads with possibility to add inner exception types. - Introduce
NonEmptyCatchBlockFilter.CreateByIncluding(IErrorSet)
,NonEmptyCatchBlockFilter.CreateByExcluding(IErrorSet) static methods
. - For
FallbackFuncsProvider
class, add protectedSetFallbackAction
,SetAsyncFallbackFunc
methods withCancellationType
param. - Directly return
Task
instead of await when converting async uncancelable non-generic delegate to precancelable when registeringPolicyResult
handler withCancellationType.Precancelable
argument. - Directly return
Task
instead of await when converting async uncancelable non generic fallback delegate to cancelable withCancellationType.Precancelable
argument. - Throw a
NotImplementedException
exception in thePolicyResult.SetErrors
protected method. - DRY refactoring for
IncludeError
,ExcludeError
methods ofCatchBlockFilter
,NonEmptyCatchBlockFilter
classes. - Update 'FallbackPolicy' README Chapter.
- Update 'Error filters' README Chapter.
- Update 'TryCatch' README Chapter.
- Introduce the
FromInnerError
,WithInnerError
methods of theErrorSet
class. - Introduce
TryCatchResult(<T>).IsSuccess
property. - Directly return
Task
instead of await in asynchronous error processing scenarios with theCancellationType.Precancelable
argument. - Use
Task.GetAwaiter().GetResult()
instead of theTask.Wait
method in sync-over-async error processing scenarios with theCancellationType.Precancelable
argument. - Remove the obsolete
ProcessingErrorContext.FromRetry
method. - 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
TryCatchBase
class and theITryCatch<T>
interface for dependency injection scenarios. - Introduce
ITryCatch.HasCatchBlockForAll
property. - Dispose of
CancellationTokenSource
objects in tests where it was absent. - Add code coverage badge.
- Update 'Error filters' README Chapter.
- Update 'TryCatch' README Chapter.
- Introduce
IErrorSet
interface andErrorSet
class. - Introduce
IncludeErrorSet(IErrorSet)
,ExcludeErrorSet(IErrorSet)
extension methods for policy processors. - Introduce
IncludeErrorSet(IErrorSet)
,ExcludeErrorSet(IErrorSet)
extension methods for library policies (RetryPolicy
,SimplePolicy
andFallbackPolicy
). - Add the
ITryCatch.ExecuteAsync
extension methods with theconfigureAwait
= false parameter. - Introduce
TryCatchResultBase.ExceptionHandlerIndex
property. - Improve conversion of
PolicyResult(<T>)
class toTryCatchResult(<T>)
class. - Add 'TryCatch' README Chapter.
TryCatch/TryCatchBuilder
classes now support more than twoCatchBlockHandler
s.
- Introduce the
TryCatch
class, which implements theITryCatch
interface with methods for executing sync or async, generic or non-generic delegates that returnTryCatchResult(<T>)
class (no more than twoCatchBlockHandler
supported so far). - Introduce the
ITryCatchBuilder
interface andTryCatchBuilder
class. - Add
NonEmptyCatchBlockFilter.ToCatchBlockHandler
andCatchBlockForAllHandler.ToTryCatch
methods. - Add
ToTryCatchBuilder
andToTryCatch
extension methods to theCatchBlockFilteredHandler
class. - Add CODE_COVERAGE.md.
- Update 'Calling Func and Action delegates in a resilient manner' README Chapter.
- Hotfix introducing new
CatchBlockHandlerFactory
class to prevent inconsistent creation ofCatchBlockHandler
subclasses.
- Introduce the
CatchBlockHandler
class and theCatchBlockFilteredHandler
andCatchBlockForAllHandler
subclasses. - Introduce new
InvokeWithSimple(Async)
extension methods with aCatchBlockHandler
parameter for non-generic delegates. - Introduce new
InvokeWithSimple(Async)<T>
extension methods with aCatchBlockHandler
parameter for generic delegates. - Introduce the
NonEmptyCatchBlockFilter
class. - Add the
RetryProcessingErrorInfo
andRetryProcessingErrorContext
classes 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
CatchBlockFilter
class and use it in theSimplePolicyProcessor
class. - Introduce new
Action.InvokeWithSimple
extension method with anCatchBlockFilter
parameter. - Introduce new
Func<CancellationToken, Task>.InvokeWithSimpleAsync
extension method with anCatchBlockFilter
parameter. - Introduce new
Func<T>.InvokeWithSimple
extension method with anCatchBlockFilter
parameter. - Introduce new
Func<CancellationToken, Task<T>>.InvokeWithSimpleAsync<T>
extension methods with anCatchBlockFilter
parameter. - Delegates, when included as part of
PolicyDelegate
in a collection, are handled error-free even if a policy rethrows an exception. - Set the
PolicyResult.ErrorFilterUnsatisfied
property totrue
when a delegate is handled as part of aPolicyDelegate
by 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 throwOperationCanceledException
if 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 thePolicyDelegateCollection
andPolicyDelegateCollection<T>
classes. - Introduce
FallbackFuncsProvider
class. - New constructors for
FallbackPolicy
classes that accept theFallbackFuncsProvider
parameter. - Introduce
PolicyCollection.WithFallback(FallbackFuncsProvider)
method. - Add
PolicyCollection.WithFallback
overloaded methods withonlyGenericFallbackForGenericDelegate
parameter. - Refactor the constructors of
FallbackPolicy
classes to accept the newonlyGenericFallbackForGenericDelegate
parameter. - Improved performance for
FallbackPolicy
, since no moreExpression
s are used to store generic fallback functions. - Made
SimplePolicyProcessor
andSimplePolicy
rethrow exception if error filter is unsatisfied. - Minimize the number of calls to the
Expression.Compile
method in thePolicyProcessor.ExceptionFilter
class. - Fix issue #93.
- Introduce
PolicyResult.FailedHandlerIndex
property. - Made
SimplePolicyProcessor
class sealed. - Update 'Error processors' README Chapter.
- Add doc comments to
IBulkErrorProcessor
,IFallbackProcessor
interfaces andFallbackPolicy
class.
- Introduce
SetPolicyResultFailedIf(<T>)
methods for thePolicyCollection
and thePolicyDelegateCollection(<T>)
classes. - Introduce
IncludeInnerError<TInnerException>
andExcludeInnerError<TInnerException>
methods for policy processors and library policies(RetryPolicy
,SimplePolicy
andFallbackPolicy
). - 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
RetryErrorContext
class in Retry processing. - Add
Apply<T>
extension method toAction<T>
delegate. - Correct the doc comments for the
SetPolicyResultFailedIfInner
methods of the library policies. - Update 'PolicyResult handlers' README Chapter.
- Introduce
WithInnerErrorProcessorOf<TException>
overloaded methods for policy processor interfaces,BulkErrorProcessor
, library policies(RetryPolicy
,SimplePolicy
andFallbackPolicy
),PolicyDelegateCollection(<T>)
andPolicyCollection
. - Introduce
SetPolicyResultFailedIf(<T>)
methods for library policies(RetryPolicy
,SimplePolicy
andFallbackPolicy
).
- Introduce
IncludeErrorSet<TException1, TException2>
andExcludeErrorSet<TException1, TException2>
extension methods for thePolicyDelegateCollection(<T>)
classes. - Introduce
PolicyResult(<T>).CriticalError
property. - Introduce
PolicyResultHandlingException.HandlerIndex
property. - Fix issue (#83): the
PolicyResult
handler 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
,SimplePolicy
andFallbackPolicy
) andPolicyCollection
. - Introduce
ExcludeErrorSet<TException1, TException2>
methods for policy processors, library policies(RetryPolicy
,SimplePolicy
andFallbackPolicy
) andPolicyCollection
. - Slightly improve performance by using the equality operator instead of the
Equals
method 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
,IncludeError
extension methods in theRetryProcessorErrorFiltering
,FallbackProcessorErrorFiltering
,SimplePolicyProcessorErrorFiltering
classes.
- Introduce
PolicyCollection.ExcludeErrorForLast
,PolicyCollection.IncludeErrorForLast
extension methods. - Introduce
PolicyDelegateCollection(<T>).ExcludeErrorForLast
,PolicyDelegateCollection<T>.IncludeErrorForLast
extension methods. - Introduce
PolicyDelegateCollectionResult(<T>).IsCanceled
property. - The condition that the
PolicyDelegateCollectionResult(<T>).IsSuccess
property be true was reinforced by the condition that theIsFailed
andIsCanceled
properties be both equal false. - The condition that the property
PolicyDelegateCollectionResult<T>.Result
not be equal todefault
was strengthened by the condition that theIsSuccess
property be true. - 'The 'PolicyDelegateCollection' chapter in the README was rewritten.
- Introduce
PolicyDelegateCollection(<T>).WithErrorProcessorOf
andPolicyDelegateCollection(<T>).WithErrorProcessor
extension methods. - Introduce
PolicyCollection.WithErrorProcessorOf
andPolicyCollection.WithErrorProcessor
extension methods. - Fix issue (#61): the handling of a
PolicyDelegateCollection
should fail fast when the collection was obtained from aPolicyCollection
and the delegate is null. - Fix the oversight related to cancellation in the
PolicyDelegatesHandler.HandleAllBySyncType
method. - DRY refactoring for extension methods adding filters to a
IPolicyDelegateCollection
.
- Support a fluent interface for the
IBulkErrorProcessor
interface. - Introduce default constructor for the
BulkErrorProcessor
class. - Introduce
PolicyResult.IsPolicySuccess
property. - Fix issue (#50) with the
PolicyResult(<T>).WrappedPolicyResults
property being empty when a wrappedPolicyCollection(<T>)
didn't handle delegate. - Reduce allocations by using only a single instance of the
EmptyErrorContext
class when processing Simple and Fallback policies. - Add the marker
ICanAddErrorProcessor
interface.
- Introduce
PolicyCollection.WrapUp
method. - Introduce
Policy.ResetWrap
method. - Fix issue (#43) when the
PolicyResult.SetFailed
method is not called in a policy result handler due to previous cancellation. - Add
PolicyDelegateCollection(<T>).WithThrowOnLastFailed
extensions methods withFunc<IEnumerable<PolicyDelegateResult(<T>)>, Exception>
as a parameter. - The
PolicyDelegateCollectionResult
'sIsFailed
andIsSuccess
properties are set once in the constructor now. - Add
PolicyDelegateResult(<T>).IsCanceled
andPolicyDelegateResult(<T>).Errors
properties. - Remove redundant
PolicyDelegateCollectionException
- related internal classes.
- Add
IPolicyDelegateCollection(<T>).AddPolicyResultHandlerForLast
andPolicyCollection.AddPolicyResultHandlerForLast
methods. - Add
PolicyDelegateResult(<T>).IsFailed
,PolicyDelegateCollectionResult(<T>).IsFailed
properties. - Add
PolicyDelegateResult(<T>).IsSuccess
,PolicyDelegateCollectionResult(<T>).IsSuccess
properties. - Add
IPolicyBase.WrapUp
extension 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
ErrorProcessorDelegate
class toErrorProcessorParam
. - Add the
RetryErrorSaverParam
class and use it in theDelegateInvoking(T)
andPolicyDelegateCollectionRegistrar
classes for extensions methods. - Rename the
PolicyDelegateBase.UseSync
property toSyncType
. - Support not cancelable
PolicyResult
handlers for policies,PolicyCollection
andPolicyDelegateCollection(<T>)
classes. - Add new
WithErrorProcessorOf
extensions methods toIPolicyProcessor
andIPolicyBase
interfaces. - The existed
DefaultErrorProcessor
class was renamed toBasicErrorProcessor
, the newDefaultErrorProcessor
was added. - Rename the
ConvertToCancelableFuncType
enum toCancellationType
. - Some classes for extensions methods was renamed, splitted or dropped.
- Add new
UseCustomErrorSaver
method to theIRetryProcessor
interface. - Add
IRetryProcessor.UseCustomErrorSaverOf(...)
extensions methods. - Add
RetryPolicy.UseCustomErrorSaverOf
extensions methods. - Refactor
IPolicyProcessor.WithErrorProcessorOf<T>(...)
overloaded methods. - Rename
CatchBlockException.ProcessException
property toProcessingException
. - Add
CatchBlockException.ExceptionSource
property. - Change
IPolicyDelegateCollectionHandler<T>.HandleAsync
methods signature. - Rename
ProcessErrorInfo
class toProcessingErrorInfo
. - Change the method signature of the interfaces
IErrorProcessor
andIBulkErrorProcessor
. - Add
PolicyResult.PolicyName
property. - Add
PolicyResult<T>.WrappedPolicyResults
property. - Made
GetResults()
method fromPolicyDelegateCollectionException.ErrorResults
property.
- Made
PolicyResult(<T>)
static creation methods internal. - Add new
PolicyResult.ErrorsNotUsed
property. - Extract the handling of
PolicyDelegateCollection(<T>)
into the new interfacesIPolicyDelegateCollectionHandler(<T>)
. - Add
IPolicyProcessor.WithErrorProcessor
generic extension method. - Add
IPolicyDelegateCollection(<T>).HandleAll(Async)
extensions methods. - Add
PolicyCollection.BuildCollectionHandlerFor
methods andPolicyCollection.HandleDelegate(Async)
extensions methods. - Refactor the
CatchBlockProcessErrorInfo
class and rename it toProcessErrorInfo
. - Rename
InvokeParams
class toErrorProcessorDelegate
.
- Introduce
PolicyResult.UnprocessedError
property. - Remove
PolicyDelegateCollectionBase<T>.LastPolicyDelegate
property. - Made
IPolicyBase.ToPolicyDelegate
extension methods without delegate param internal. - Made
IHandlerRunnerBase
interface and its inheritors internal. - Change the accessibility of all
IPolicyBaseExtensions
error filter related extension methods to internal. - Change the accessibility of all
IPolicyProcessorExtensions
error filter related extension methods to internal. - Drop redundant
ICanAddPolicyResultHandler<T>
interface.
- Introduce
PolicyCollectin
class. - More robust
PolicyDelegateCollection(<T>)
creation. - All
PolicyDelegateCollection(<T>)
creation methods are namedCreate
. - Drop
PolicyDelegateCollection(<T>).SetCommonDelegate
method. - New public
RetryPolicy.RetryInfo
property. - Made
PolicyResult<T>.SetResult
method internal. - Add
PolicyResult.FailedReason
property. - Add
AddPolicyResultHandler<T>
,AddPolicyResultHandlerForAll<T>
methods for handlingPolicyResult<T>
. - Add
PolicyDelegateCollectionResult(<T>).LastPolicyResult
property. - Drop
PolicyDelegateCollectionResult.LastFailedError
property.
- Add
SimplePolicy
-related methods to extensions methods for delegates. IPolicyProcessor
now has anErrorFilter
property. Methods that add filters were removed.- Fix
PolicyDelegateCollectionExtensions.WithFallback
method signature - Change the name of the
PolicyResult.IsOk
property toNoError
.
- Introduce
SimplePolicy
andSimplePolicyProcessor
classes - Drop the
PolicyDelegateCollection(<T>).WithCommonResultErrorsHandler
method - Alter the name of the policy
WithPolicyResultHandler
method toAddPolicyResultHandler
- Change the name of the
PolicyDelegateCollection(<T>).WithCommonDelegate
methods toSetCommonDelegate
- Policy
ForError
methods were renamed toIncludeError
- Rename
PolicyDelegateCollection(<T>).WithCommonResultHandler
toAddPolicyResultHandlerForAll
- Rename
PolicyDelegateCollection(<T>).ForError
methods toIncludeErrorForAll
PolicyDelegateCollection(<T>).ExcludeError
methods was renamed toExcludeErrorForAll
- Get rid of
RetryErrorProcessor
,FallbackErrorProcessor
classes. - Rename the
PolicyHandledResult
andPolicyHandledInfo
classes (nowPolicyDelegateResult
andPolicyDelegateInfo
respectively) and the related classes. - The name of the
PolicyDelegateCollection(T>)
creation methods is started with theCreate
prefix.
- 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)