- 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)