Releases: kolan72/PoliNorError
Releases · kolan72/PoliNorError
2.19.15
Improvements
- 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
). - Introduce
PolicyResultHandlerFailedException.Result
property. - Introduce
PolicyResultHandlerFailedException<T>
exception.
Small changes
- Made the
cancellationToken
parameter optional inPolicyDelegate(<T>).HandleAsync
methods. - 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.
Docs changes
- 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.
Bumps and Dependency updates
- 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.
2.19.11
Improvements
- 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.
Small changes
- Move null guards before getting a fallback delegate in
FallbackPolicyBase
. - Remove deprecated suppression for
PolicyResultHandlingException
.
Docs changes
- 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.
2.19.8
Improvements
- 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.
Small changes
- 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.
Docs changes
- 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.
2.19.5
Improvements
- Introduce jittering for
RetryDelay
subclasses, adapted from Polly. - Introduce
RetryDelayOptions.MaxDelay
property. - Introduce
Create
static methods forConstantRetryDelay
,LinearRetryDelay
,ExponentialRetryDelay
classes.
Small changes
- Bump NUnit3TestAdapter from 4.5.0 to 4.6.0 in the nunit group.
2.19.0
Improvements
- 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.
Small changes
- DRY refactoring and new tests for
RetryPolicy.WithWait
method overloads.
Docs changes
- Add doc comments to
IRetryProcessor
class. - Add doc comments to
RetryCountInfoOptions
class andRetryCountInfo
struct. - Update 'RetryPolicy' README Chapter.
- Update 'TryCatch' README Chapter.
2.18.14
Improvements
- Introduce the
NonEmptyCatchBlockFilter.ExcludeErrorSet
,NonEmptyCatchBlockFilter.IncludeErrorSet
methods. - Introduce the
CatchBlockHandlerFactory.FilterExceptionsByIncluding(IErrorSet)
,CatchBlockHandlerFactory.FilterExceptionsByExcluding(IErrorSet)
methods.
Small changes
- 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.
Docs changes
- Add doc comments to
IErrorSet
interface andErrorSet
class.
2.18.11
Improvements
- 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.
Small changes
- Throw a
NotImplementedException
exception in thePolicyResult.SetErrors
protected method. - DRY refactoring for
IncludeError
,ExcludeError
methods ofCatchBlockFilter
,NonEmptyCatchBlockFilter
classes.
Docs changes
- Update 'FallbackPolicy' README Chapter.
- Update 'Error filters' README Chapter.
- Update 'TryCatch' README Chapter.
2.18.4
Improvements
- 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.
Small changes
- Remove the obsolete
ProcessingErrorContext.FromRetry
method. - Correct error set related test names for
DefaultFallbackProcessorTests
,DefaultRetryProcessorTests
andSimplePolicyProcessorTests
. - Remove redundant
ErrorWithInnerExcThrowingFuncs.FunWithInner
method in tests.
Docs changes
- Add README main content.
- Update 'PolicyResult' README Chapter.
2.18.0
Improvements
- 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.
Small changes
- Introduce
ITryCatch.HasCatchBlockForAll
property. - Dispose of
CancellationTokenSource
objects in tests where it was absent.
Docs changes
- Add code coverage badge.
- Update 'Error filters' README Chapter.
- Update 'TryCatch' README Chapter.
2.17.0
Improvements
- 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.
Small changes
- Introduce
TryCatchResultBase.ExceptionHandlerIndex
property. - Improve conversion of
PolicyResult(<T>)
class toTryCatchResult(<T>)
class.
Docs changes
- Add 'TryCatch' README Chapter.