Table of Contents

Class Policy

Namespace
Polly
Assembly
Polly.dll
public abstract class Policy : PolicyBase, ISyncPolicy, IsPolicy
Inheritance
Policy
Implements
Derived
Inherited Members
Extension Methods

Constructors

Policy(PolicyBuilder)

protected Policy(PolicyBuilder policyBuilder = null)

Parameters

policyBuilder PolicyBuilder

Methods

Bulkhead(int)

public static BulkheadPolicy Bulkhead(int maxParallelization)

Parameters

maxParallelization int

Returns

BulkheadPolicy

Bulkhead(int, Action<Context>)

public static BulkheadPolicy Bulkhead(int maxParallelization, Action<Context> onBulkheadRejected)

Parameters

maxParallelization int
onBulkheadRejected Action<Context>

Returns

BulkheadPolicy

Bulkhead(int, int)

public static BulkheadPolicy Bulkhead(int maxParallelization, int maxQueuingActions)

Parameters

maxParallelization int
maxQueuingActions int

Returns

BulkheadPolicy

Bulkhead(int, int, Action<Context>)

public static BulkheadPolicy Bulkhead(int maxParallelization, int maxQueuingActions, Action<Context> onBulkheadRejected)

Parameters

maxParallelization int
maxQueuingActions int
onBulkheadRejected Action<Context>

Returns

BulkheadPolicy

BulkheadAsync(int)

public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization)

Parameters

maxParallelization int

Returns

AsyncBulkheadPolicy

BulkheadAsync(int, Func<Context, Task>)

public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization, Func<Context, Task> onBulkheadRejectedAsync)

Parameters

maxParallelization int
onBulkheadRejectedAsync Func<Context, Task>

Returns

AsyncBulkheadPolicy

BulkheadAsync(int, int)

public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization, int maxQueuingActions)

Parameters

maxParallelization int
maxQueuingActions int

Returns

AsyncBulkheadPolicy

BulkheadAsync(int, int, Func<Context, Task>)

public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization, int maxQueuingActions, Func<Context, Task> onBulkheadRejectedAsync)

Parameters

maxParallelization int
maxQueuingActions int
onBulkheadRejectedAsync Func<Context, Task>

Returns

AsyncBulkheadPolicy

BulkheadAsync<TResult>(int)

public static AsyncBulkheadPolicy<TResult> BulkheadAsync<TResult>(int maxParallelization)

Parameters

maxParallelization int

Returns

AsyncBulkheadPolicy<TResult>

Type Parameters

TResult

BulkheadAsync<TResult>(int, Func<Context, Task>)

public static AsyncBulkheadPolicy<TResult> BulkheadAsync<TResult>(int maxParallelization, Func<Context, Task> onBulkheadRejectedAsync)

Parameters

maxParallelization int
onBulkheadRejectedAsync Func<Context, Task>

Returns

AsyncBulkheadPolicy<TResult>

Type Parameters

TResult

BulkheadAsync<TResult>(int, int)

public static AsyncBulkheadPolicy<TResult> BulkheadAsync<TResult>(int maxParallelization, int maxQueuingActions)

Parameters

maxParallelization int
maxQueuingActions int

Returns

AsyncBulkheadPolicy<TResult>

Type Parameters

TResult

BulkheadAsync<TResult>(int, int, Func<Context, Task>)

public static AsyncBulkheadPolicy<TResult> BulkheadAsync<TResult>(int maxParallelization, int maxQueuingActions, Func<Context, Task> onBulkheadRejectedAsync)

Parameters

maxParallelization int
maxQueuingActions int
onBulkheadRejectedAsync Func<Context, Task>

Returns

AsyncBulkheadPolicy<TResult>

Type Parameters

TResult

Bulkhead<TResult>(int)

public static BulkheadPolicy<TResult> Bulkhead<TResult>(int maxParallelization)

Parameters

maxParallelization int

Returns

BulkheadPolicy<TResult>

Type Parameters

TResult

Bulkhead<TResult>(int, Action<Context>)

public static BulkheadPolicy<TResult> Bulkhead<TResult>(int maxParallelization, Action<Context> onBulkheadRejected)

Parameters

maxParallelization int
onBulkheadRejected Action<Context>

Returns

BulkheadPolicy<TResult>

Type Parameters

TResult

Bulkhead<TResult>(int, int)

public static BulkheadPolicy<TResult> Bulkhead<TResult>(int maxParallelization, int maxQueuingActions)

Parameters

maxParallelization int
maxQueuingActions int

Returns

BulkheadPolicy<TResult>

Type Parameters

TResult

Bulkhead<TResult>(int, int, Action<Context>)

public static BulkheadPolicy<TResult> Bulkhead<TResult>(int maxParallelization, int maxQueuingActions, Action<Context> onBulkheadRejected)

Parameters

maxParallelization int
maxQueuingActions int
onBulkheadRejected Action<Context>

Returns

BulkheadPolicy<TResult>

Type Parameters

TResult

Cache(ISyncCacheProvider, ITtlStrategy, ICacheKeyStrategy, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

CachePolicy

Cache(ISyncCacheProvider, ITtlStrategy, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy

Cache(ISyncCacheProvider, ITtlStrategy, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
onCacheError Action<Context, string, Exception>

Returns

CachePolicy

Cache(ISyncCacheProvider, ITtlStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy

Cache(ISyncCacheProvider, ITtlStrategy, Func<Context, string>, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

CachePolicy

Cache(ISyncCacheProvider, ITtlStrategy, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy

Cache(ISyncCacheProvider, TimeSpan, ICacheKeyStrategy, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

CachePolicy

Cache(ISyncCacheProvider, TimeSpan, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy

Cache(ISyncCacheProvider, TimeSpan, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
onCacheError Action<Context, string, Exception>

Returns

CachePolicy

Cache(ISyncCacheProvider, TimeSpan, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy

Cache(ISyncCacheProvider, TimeSpan, Func<Context, string>, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

CachePolicy

Cache(ISyncCacheProvider, TimeSpan, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy

CacheAsync(IAsyncCacheProvider, ITtlStrategy, ICacheKeyStrategy, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync(IAsyncCacheProvider, ITtlStrategy, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync(IAsyncCacheProvider, ITtlStrategy, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync(IAsyncCacheProvider, ITtlStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync(IAsyncCacheProvider, ITtlStrategy, Func<Context, string>, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync(IAsyncCacheProvider, ITtlStrategy, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync(IAsyncCacheProvider, TimeSpan, ICacheKeyStrategy, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync(IAsyncCacheProvider, TimeSpan, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync(IAsyncCacheProvider, TimeSpan, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync(IAsyncCacheProvider, TimeSpan, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync(IAsyncCacheProvider, TimeSpan, Func<Context, string>, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync(IAsyncCacheProvider, TimeSpan, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy

CacheAsync<TResult>(IAsyncCacheProvider, ITtlStrategy, ICacheKeyStrategy, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider, ITtlStrategy, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider, ITtlStrategy, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider, ITtlStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider, ITtlStrategy, Func<Context, string>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider, ITtlStrategy, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider, TimeSpan, ICacheKeyStrategy, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider, TimeSpan, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider, TimeSpan, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider, TimeSpan, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider, TimeSpan, Func<Context, string>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider, TimeSpan, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy, ICacheKeyStrategy, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy, Func<Context, string>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy<TResult>, ICacheKeyStrategy, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy<TResult>, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy<TResult>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy<TResult>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy<TResult>, Func<Context, string>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, ITtlStrategy<TResult>, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, TimeSpan, ICacheKeyStrategy, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, TimeSpan, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, TimeSpan, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttl TimeSpan
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, TimeSpan, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttl TimeSpan
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, TimeSpan, Func<Context, string>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

CacheAsync<TResult>(IAsyncCacheProvider<TResult>, TimeSpan, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider IAsyncCacheProvider<TResult>
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

AsyncCachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, ITtlStrategy, ICacheKeyStrategy, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, ITtlStrategy, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, ITtlStrategy, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, ITtlStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, ITtlStrategy, Func<Context, string>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, ITtlStrategy, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, TimeSpan, ICacheKeyStrategy, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, TimeSpan, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, TimeSpan, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, TimeSpan ttl, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, TimeSpan, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, TimeSpan ttl, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, TimeSpan, Func<Context, string>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider, TimeSpan, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy, ICacheKeyStrategy, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy, Func<Context, string>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy<TResult>, ICacheKeyStrategy, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy<TResult>, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy<TResult>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy<TResult>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy<TResult>, Func<Context, string>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, ITtlStrategy<TResult>, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttlStrategy ITtlStrategy<TResult>
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, TimeSpan, ICacheKeyStrategy, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, TimeSpan, ICacheKeyStrategy, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttl TimeSpan
cacheKeyStrategy ICacheKeyStrategy
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, TimeSpan, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttl TimeSpan
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, TimeSpan, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttl TimeSpan
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, TimeSpan, Func<Context, string>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string, Exception> onCacheError = null)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Cache<TResult>(ISyncCacheProvider<TResult>, TimeSpan, Func<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string>, Action<Context, string, Exception>, Action<Context, string, Exception>)

public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> cacheProvider, TimeSpan ttl, Func<Context, string> cacheKeyStrategy, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, Action<Context, string, Exception> onCacheGetError, Action<Context, string, Exception> onCachePutError)

Parameters

cacheProvider ISyncCacheProvider<TResult>
ttl TimeSpan
cacheKeyStrategy Func<Context, string>
onCacheGet Action<Context, string>
onCacheMiss Action<Context, string>
onCachePut Action<Context, string>
onCacheGetError Action<Context, string, Exception>
onCachePutError Action<Context, string, Exception>

Returns

CachePolicy<TResult>

Type Parameters

TResult

Execute(Action)

public void Execute(Action action)

Parameters

action Action

Execute(Action<Context, CancellationToken>, Context, CancellationToken)

public void Execute(Action<Context, CancellationToken> action, Context context, CancellationToken cancellationToken)

Parameters

action Action<Context, CancellationToken>
context Context
cancellationToken CancellationToken

Execute(Action<Context, CancellationToken>, IDictionary<string, object>, CancellationToken)

public void Execute(Action<Context, CancellationToken> action, IDictionary<string, object> contextData, CancellationToken cancellationToken)

Parameters

action Action<Context, CancellationToken>
contextData IDictionary<string, object>
cancellationToken CancellationToken

Execute(Action<Context>, Context)

public void Execute(Action<Context> action, Context context)

Parameters

action Action<Context>
context Context

Execute(Action<Context>, IDictionary<string, object>)

public void Execute(Action<Context> action, IDictionary<string, object> contextData)

Parameters

action Action<Context>
contextData IDictionary<string, object>

Execute(Action<CancellationToken>, CancellationToken)

public void Execute(Action<CancellationToken> action, CancellationToken cancellationToken)

Parameters

action Action<CancellationToken>
cancellationToken CancellationToken

ExecuteAndCapture(Action)

public PolicyResult ExecuteAndCapture(Action action)

Parameters

action Action

Returns

PolicyResult

ExecuteAndCapture(Action<Context, CancellationToken>, Context, CancellationToken)

public PolicyResult ExecuteAndCapture(Action<Context, CancellationToken> action, Context context, CancellationToken cancellationToken)

Parameters

action Action<Context, CancellationToken>
context Context
cancellationToken CancellationToken

Returns

PolicyResult

ExecuteAndCapture(Action<Context, CancellationToken>, IDictionary<string, object>, CancellationToken)

public PolicyResult ExecuteAndCapture(Action<Context, CancellationToken> action, IDictionary<string, object> contextData, CancellationToken cancellationToken)

Parameters

action Action<Context, CancellationToken>
contextData IDictionary<string, object>
cancellationToken CancellationToken

Returns

PolicyResult

ExecuteAndCapture(Action<Context>, Context)

public PolicyResult ExecuteAndCapture(Action<Context> action, Context context)

Parameters

action Action<Context>
context Context

Returns

PolicyResult

ExecuteAndCapture(Action<Context>, IDictionary<string, object>)

public PolicyResult ExecuteAndCapture(Action<Context> action, IDictionary<string, object> contextData)

Parameters

action Action<Context>
contextData IDictionary<string, object>

Returns

PolicyResult

ExecuteAndCapture(Action<CancellationToken>, CancellationToken)

public PolicyResult ExecuteAndCapture(Action<CancellationToken> action, CancellationToken cancellationToken)

Parameters

action Action<CancellationToken>
cancellationToken CancellationToken

Returns

PolicyResult

ExecuteAndCapture<TResult>(Func<Context, CancellationToken, TResult>, Context, CancellationToken)

public PolicyResult<TResult> ExecuteAndCapture<TResult>(Func<Context, CancellationToken, TResult> action, Context context, CancellationToken cancellationToken)

Parameters

action Func<Context, CancellationToken, TResult>
context Context
cancellationToken CancellationToken

Returns

PolicyResult<TResult>

Type Parameters

TResult

ExecuteAndCapture<TResult>(Func<Context, CancellationToken, TResult>, IDictionary<string, object>, CancellationToken)

public PolicyResult<TResult> ExecuteAndCapture<TResult>(Func<Context, CancellationToken, TResult> action, IDictionary<string, object> contextData, CancellationToken cancellationToken)

Parameters

action Func<Context, CancellationToken, TResult>
contextData IDictionary<string, object>
cancellationToken CancellationToken

Returns

PolicyResult<TResult>

Type Parameters

TResult

ExecuteAndCapture<TResult>(Func<Context, TResult>, Context)

public PolicyResult<TResult> ExecuteAndCapture<TResult>(Func<Context, TResult> action, Context context)

Parameters

action Func<Context, TResult>
context Context

Returns

PolicyResult<TResult>

Type Parameters

TResult

ExecuteAndCapture<TResult>(Func<Context, TResult>, IDictionary<string, object>)

public PolicyResult<TResult> ExecuteAndCapture<TResult>(Func<Context, TResult> action, IDictionary<string, object> contextData)

Parameters

action Func<Context, TResult>
contextData IDictionary<string, object>

Returns

PolicyResult<TResult>

Type Parameters

TResult

ExecuteAndCapture<TResult>(Func<CancellationToken, TResult>, CancellationToken)

public PolicyResult<TResult> ExecuteAndCapture<TResult>(Func<CancellationToken, TResult> action, CancellationToken cancellationToken)

Parameters

action Func<CancellationToken, TResult>
cancellationToken CancellationToken

Returns

PolicyResult<TResult>

Type Parameters

TResult

ExecuteAndCapture<TResult>(Func<TResult>)

public PolicyResult<TResult> ExecuteAndCapture<TResult>(Func<TResult> action)

Parameters

action Func<TResult>

Returns

PolicyResult<TResult>

Type Parameters

TResult

Execute<TResult>(Func<Context, CancellationToken, TResult>, Context, CancellationToken)

public TResult Execute<TResult>(Func<Context, CancellationToken, TResult> action, Context context, CancellationToken cancellationToken)

Parameters

action Func<Context, CancellationToken, TResult>
context Context
cancellationToken CancellationToken

Returns

TResult

Type Parameters

TResult

Execute<TResult>(Func<Context, CancellationToken, TResult>, IDictionary<string, object>, CancellationToken)

public TResult Execute<TResult>(Func<Context, CancellationToken, TResult> action, IDictionary<string, object> contextData, CancellationToken cancellationToken)

Parameters

action Func<Context, CancellationToken, TResult>
contextData IDictionary<string, object>
cancellationToken CancellationToken

Returns

TResult

Type Parameters

TResult

Execute<TResult>(Func<Context, TResult>, Context)

public TResult Execute<TResult>(Func<Context, TResult> action, Context context)

Parameters

action Func<Context, TResult>
context Context

Returns

TResult

Type Parameters

TResult

Execute<TResult>(Func<Context, TResult>, IDictionary<string, object>)

public TResult Execute<TResult>(Func<Context, TResult> action, IDictionary<string, object> contextData)

Parameters

action Func<Context, TResult>
contextData IDictionary<string, object>

Returns

TResult

Type Parameters

TResult

Execute<TResult>(Func<CancellationToken, TResult>, CancellationToken)

public TResult Execute<TResult>(Func<CancellationToken, TResult> action, CancellationToken cancellationToken)

Parameters

action Func<CancellationToken, TResult>
cancellationToken CancellationToken

Returns

TResult

Type Parameters

TResult

Execute<TResult>(Func<TResult>)

public TResult Execute<TResult>(Func<TResult> action)

Parameters

action Func<TResult>

Returns

TResult

Type Parameters

TResult

HandleInner<TException>()

public static PolicyBuilder HandleInner<TException>() where TException : Exception

Returns

PolicyBuilder

Type Parameters

TException

HandleInner<TException>(Func<TException, bool>)

public static PolicyBuilder HandleInner<TException>(Func<TException, bool> exceptionPredicate) where TException : Exception

Parameters

exceptionPredicate Func<TException, bool>

Returns

PolicyBuilder

Type Parameters

TException

HandleResult<TResult>(Func<TResult, bool>)

public static PolicyBuilder<TResult> HandleResult<TResult>(Func<TResult, bool> resultPredicate)

Parameters

resultPredicate Func<TResult, bool>

Returns

PolicyBuilder<TResult>

Type Parameters

TResult

HandleResult<TResult>(TResult)

public static PolicyBuilder<TResult> HandleResult<TResult>(TResult result)

Parameters

result TResult

Returns

PolicyBuilder<TResult>

Type Parameters

TResult

Handle<TException>()

public static PolicyBuilder Handle<TException>() where TException : Exception

Returns

PolicyBuilder

Type Parameters

TException

Handle<TException>(Func<TException, bool>)

public static PolicyBuilder Handle<TException>(Func<TException, bool> exceptionPredicate) where TException : Exception

Parameters

exceptionPredicate Func<TException, bool>

Returns

PolicyBuilder

Type Parameters

TException

Implementation(Action<Context, CancellationToken>, Context, CancellationToken)

protected virtual void Implementation(Action<Context, CancellationToken> action, Context context, CancellationToken cancellationToken)

Parameters

action Action<Context, CancellationToken>
context Context
cancellationToken CancellationToken

Implementation<TResult>(Func<Context, CancellationToken, TResult>, Context, CancellationToken)

protected abstract TResult Implementation<TResult>(Func<Context, CancellationToken, TResult> action, Context context, CancellationToken cancellationToken)

Parameters

action Func<Context, CancellationToken, TResult>
context Context
cancellationToken CancellationToken

Returns

TResult

Type Parameters

TResult

NoOp()

public static NoOpPolicy NoOp()

Returns

NoOpPolicy

NoOpAsync()

public static AsyncNoOpPolicy NoOpAsync()

Returns

AsyncNoOpPolicy

NoOpAsync<TResult>()

public static AsyncNoOpPolicy<TResult> NoOpAsync<TResult>()

Returns

AsyncNoOpPolicy<TResult>

Type Parameters

TResult

NoOp<TResult>()

public static NoOpPolicy<TResult> NoOp<TResult>()

Returns

NoOpPolicy<TResult>

Type Parameters

TResult

RateLimit(int, TimeSpan)

public static RateLimitPolicy RateLimit(int numberOfExecutions, TimeSpan perTimeSpan)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan

Returns

RateLimitPolicy

RateLimit(int, TimeSpan, int)

public static RateLimitPolicy RateLimit(int numberOfExecutions, TimeSpan perTimeSpan, int maxBurst)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan
maxBurst int

Returns

RateLimitPolicy

RateLimitAsync(int, TimeSpan)

public static AsyncRateLimitPolicy RateLimitAsync(int numberOfExecutions, TimeSpan perTimeSpan)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan

Returns

AsyncRateLimitPolicy

RateLimitAsync(int, TimeSpan, int)

public static AsyncRateLimitPolicy RateLimitAsync(int numberOfExecutions, TimeSpan perTimeSpan, int maxBurst)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan
maxBurst int

Returns

AsyncRateLimitPolicy

RateLimitAsync<TResult>(int, TimeSpan)

public static AsyncRateLimitPolicy<TResult> RateLimitAsync<TResult>(int numberOfExecutions, TimeSpan perTimeSpan)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan

Returns

AsyncRateLimitPolicy<TResult>

Type Parameters

TResult

RateLimitAsync<TResult>(int, TimeSpan, Func<TimeSpan, Context, TResult>)

public static AsyncRateLimitPolicy<TResult> RateLimitAsync<TResult>(int numberOfExecutions, TimeSpan perTimeSpan, Func<TimeSpan, Context, TResult> retryAfterFactory)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan
retryAfterFactory Func<TimeSpan, Context, TResult>

Returns

AsyncRateLimitPolicy<TResult>

Type Parameters

TResult

RateLimitAsync<TResult>(int, TimeSpan, int)

public static AsyncRateLimitPolicy<TResult> RateLimitAsync<TResult>(int numberOfExecutions, TimeSpan perTimeSpan, int maxBurst)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan
maxBurst int

Returns

AsyncRateLimitPolicy<TResult>

Type Parameters

TResult

RateLimitAsync<TResult>(int, TimeSpan, int, Func<TimeSpan, Context, TResult>)

public static AsyncRateLimitPolicy<TResult> RateLimitAsync<TResult>(int numberOfExecutions, TimeSpan perTimeSpan, int maxBurst, Func<TimeSpan, Context, TResult> retryAfterFactory)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan
maxBurst int
retryAfterFactory Func<TimeSpan, Context, TResult>

Returns

AsyncRateLimitPolicy<TResult>

Type Parameters

TResult

RateLimit<TResult>(int, TimeSpan)

public static RateLimitPolicy<TResult> RateLimit<TResult>(int numberOfExecutions, TimeSpan perTimeSpan)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan

Returns

RateLimitPolicy<TResult>

Type Parameters

TResult

RateLimit<TResult>(int, TimeSpan, Func<TimeSpan, Context, TResult>)

public static RateLimitPolicy<TResult> RateLimit<TResult>(int numberOfExecutions, TimeSpan perTimeSpan, Func<TimeSpan, Context, TResult> retryAfterFactory)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan
retryAfterFactory Func<TimeSpan, Context, TResult>

Returns

RateLimitPolicy<TResult>

Type Parameters

TResult

RateLimit<TResult>(int, TimeSpan, int)

public static RateLimitPolicy<TResult> RateLimit<TResult>(int numberOfExecutions, TimeSpan perTimeSpan, int maxBurst)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan
maxBurst int

Returns

RateLimitPolicy<TResult>

Type Parameters

TResult

RateLimit<TResult>(int, TimeSpan, int, Func<TimeSpan, Context, TResult>)

public static RateLimitPolicy<TResult> RateLimit<TResult>(int numberOfExecutions, TimeSpan perTimeSpan, int maxBurst, Func<TimeSpan, Context, TResult> retryAfterFactory)

Parameters

numberOfExecutions int
perTimeSpan TimeSpan
maxBurst int
retryAfterFactory Func<TimeSpan, Context, TResult>

Returns

RateLimitPolicy<TResult>

Type Parameters

TResult

Timeout(Func<Context, TimeSpan>)

public static TimeoutPolicy Timeout(Func<Context, TimeSpan> timeoutProvider)

Parameters

timeoutProvider Func<Context, TimeSpan>

Returns

TimeoutPolicy

Timeout(Func<Context, TimeSpan>, TimeoutStrategy)

public static TimeoutPolicy Timeout(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy

Returns

TimeoutPolicy

Timeout(Func<Context, TimeSpan>, TimeoutStrategy, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy Timeout(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy

Timeout(Func<Context, TimeSpan>, TimeoutStrategy, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy Timeout(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy

Timeout(Func<Context, TimeSpan>, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy Timeout(Func<Context, TimeSpan> timeoutProvider, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeoutProvider Func<Context, TimeSpan>
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy

Timeout(Func<Context, TimeSpan>, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy Timeout(Func<Context, TimeSpan> timeoutProvider, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeoutProvider Func<Context, TimeSpan>
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy

Timeout(Func<TimeSpan>)

public static TimeoutPolicy Timeout(Func<TimeSpan> timeoutProvider)

Parameters

timeoutProvider Func<TimeSpan>

Returns

TimeoutPolicy

Timeout(Func<TimeSpan>, TimeoutStrategy)

public static TimeoutPolicy Timeout(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy

Returns

TimeoutPolicy

Timeout(Func<TimeSpan>, TimeoutStrategy, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy Timeout(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy

Timeout(Func<TimeSpan>, TimeoutStrategy, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy Timeout(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy

Timeout(Func<TimeSpan>, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy Timeout(Func<TimeSpan> timeoutProvider, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeoutProvider Func<TimeSpan>
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy

Timeout(Func<TimeSpan>, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy Timeout(Func<TimeSpan> timeoutProvider, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeoutProvider Func<TimeSpan>
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy

Timeout(int)

public static TimeoutPolicy Timeout(int seconds)

Parameters

seconds int

Returns

TimeoutPolicy

Timeout(int, TimeoutStrategy)

public static TimeoutPolicy Timeout(int seconds, TimeoutStrategy timeoutStrategy)

Parameters

seconds int
timeoutStrategy TimeoutStrategy

Returns

TimeoutPolicy

Timeout(int, TimeoutStrategy, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy Timeout(int seconds, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

seconds int
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy

Timeout(int, TimeoutStrategy, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy Timeout(int seconds, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task> onTimeout)

Parameters

seconds int
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy

Timeout(int, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy Timeout(int seconds, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

seconds int
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy

Timeout(int, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy Timeout(int seconds, Action<Context, TimeSpan, Task> onTimeout)

Parameters

seconds int
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy

Timeout(TimeSpan)

public static TimeoutPolicy Timeout(TimeSpan timeout)

Parameters

timeout TimeSpan

Returns

TimeoutPolicy

Timeout(TimeSpan, TimeoutStrategy)

public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStrategy)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy

Returns

TimeoutPolicy

Timeout(TimeSpan, TimeoutStrategy, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy

Timeout(TimeSpan, TimeoutStrategy, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy

Timeout(TimeSpan, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy Timeout(TimeSpan timeout, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeout TimeSpan
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy

Timeout(TimeSpan, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy Timeout(TimeSpan timeout, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeout TimeSpan
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy

TimeoutAsync(Func<Context, TimeSpan>)

public static AsyncTimeoutPolicy TimeoutAsync(Func<Context, TimeSpan> timeoutProvider)

Parameters

timeoutProvider Func<Context, TimeSpan>

Returns

AsyncTimeoutPolicy

TimeoutAsync(Func<Context, TimeSpan>, TimeoutStrategy)

public static AsyncTimeoutPolicy TimeoutAsync(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy

Returns

AsyncTimeoutPolicy

TimeoutAsync(Func<Context, TimeSpan>, TimeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(Func<Context, TimeSpan>, TimeoutStrategy, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(Func<Context, TimeSpan>, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(Func<Context, TimeSpan> timeoutProvider, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<Context, TimeSpan>
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(Func<Context, TimeSpan>, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(Func<Context, TimeSpan> timeoutProvider, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<Context, TimeSpan>
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(Func<TimeSpan>)

public static AsyncTimeoutPolicy TimeoutAsync(Func<TimeSpan> timeoutProvider)

Parameters

timeoutProvider Func<TimeSpan>

Returns

AsyncTimeoutPolicy

TimeoutAsync(Func<TimeSpan>, TimeoutStrategy)

public static AsyncTimeoutPolicy TimeoutAsync(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy

Returns

AsyncTimeoutPolicy

TimeoutAsync(Func<TimeSpan>, TimeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(Func<TimeSpan>, TimeoutStrategy, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(Func<TimeSpan>, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(Func<TimeSpan> timeoutProvider, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<TimeSpan>
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(Func<TimeSpan>, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(Func<TimeSpan> timeoutProvider, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<TimeSpan>
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(int)

public static AsyncTimeoutPolicy TimeoutAsync(int seconds)

Parameters

seconds int

Returns

AsyncTimeoutPolicy

TimeoutAsync(int, TimeoutStrategy)

public static AsyncTimeoutPolicy TimeoutAsync(int seconds, TimeoutStrategy timeoutStrategy)

Parameters

seconds int
timeoutStrategy TimeoutStrategy

Returns

AsyncTimeoutPolicy

TimeoutAsync(int, TimeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(int seconds, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

seconds int
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(int, TimeoutStrategy, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(int seconds, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

seconds int
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(int, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

seconds int
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(int, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

seconds int
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(TimeSpan)

public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout)

Parameters

timeout TimeSpan

Returns

AsyncTimeoutPolicy

TimeoutAsync(TimeSpan, TimeoutStrategy)

public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy timeoutStrategy)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy

Returns

AsyncTimeoutPolicy

TimeoutAsync(TimeSpan, TimeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(TimeSpan, TimeoutStrategy, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(TimeSpan, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeout TimeSpan
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync(TimeSpan, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeout TimeSpan
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy

TimeoutAsync<TResult>(Func<Context, TimeSpan>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<Context, TimeSpan> timeoutProvider)

Parameters

timeoutProvider Func<Context, TimeSpan>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(Func<Context, TimeSpan>, TimeoutStrategy)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(Func<Context, TimeSpan>, TimeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(Func<Context, TimeSpan>, TimeoutStrategy, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(Func<Context, TimeSpan>, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<Context, TimeSpan> timeoutProvider, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<Context, TimeSpan>
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(Func<Context, TimeSpan>, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<Context, TimeSpan> timeoutProvider, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<Context, TimeSpan>
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(Func<TimeSpan>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<TimeSpan> timeoutProvider)

Parameters

timeoutProvider Func<TimeSpan>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(Func<TimeSpan>, TimeoutStrategy)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(Func<TimeSpan>, TimeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(Func<TimeSpan>, TimeoutStrategy, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(Func<TimeSpan>, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<TimeSpan> timeoutProvider, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<TimeSpan>
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(Func<TimeSpan>, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(Func<TimeSpan> timeoutProvider, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeoutProvider Func<TimeSpan>
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(int)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(int seconds)

Parameters

seconds int

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(int, TimeoutStrategy)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(int seconds, TimeoutStrategy timeoutStrategy)

Parameters

seconds int
timeoutStrategy TimeoutStrategy

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(int, TimeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(int seconds, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

seconds int
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(int, TimeoutStrategy, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(int seconds, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

seconds int
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(int, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(int seconds, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

seconds int
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(int, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(int seconds, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

seconds int
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(TimeSpan)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(TimeSpan timeout)

Parameters

timeout TimeSpan

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(TimeSpan, TimeoutStrategy)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(TimeSpan timeout, TimeoutStrategy timeoutStrategy)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(TimeSpan, TimeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(TimeSpan, TimeoutStrategy, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(TimeSpan, Func<Context, TimeSpan, Task, Exception, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(TimeSpan timeout, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)

Parameters

timeout TimeSpan
onTimeoutAsync Func<Context, TimeSpan, Task, Exception, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

TimeoutAsync<TResult>(TimeSpan, Func<Context, TimeSpan, Task, Task>)

public static AsyncTimeoutPolicy<TResult> TimeoutAsync<TResult>(TimeSpan timeout, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)

Parameters

timeout TimeSpan
onTimeoutAsync Func<Context, TimeSpan, Task, Task>

Returns

AsyncTimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<Context, TimeSpan>)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<Context, TimeSpan> timeoutProvider)

Parameters

timeoutProvider Func<Context, TimeSpan>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<Context, TimeSpan>, TimeoutStrategy)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<Context, TimeSpan>, TimeoutStrategy, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<Context, TimeSpan>, TimeoutStrategy, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<Context, TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeoutProvider Func<Context, TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<Context, TimeSpan>, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<Context, TimeSpan> timeoutProvider, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeoutProvider Func<Context, TimeSpan>
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<Context, TimeSpan>, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<Context, TimeSpan> timeoutProvider, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeoutProvider Func<Context, TimeSpan>
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<TimeSpan>)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<TimeSpan> timeoutProvider)

Parameters

timeoutProvider Func<TimeSpan>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<TimeSpan>, TimeoutStrategy)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<TimeSpan>, TimeoutStrategy, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<TimeSpan>, TimeoutStrategy, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<TimeSpan> timeoutProvider, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeoutProvider Func<TimeSpan>
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<TimeSpan>, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<TimeSpan> timeoutProvider, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeoutProvider Func<TimeSpan>
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(Func<TimeSpan>, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy<TResult> Timeout<TResult>(Func<TimeSpan> timeoutProvider, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeoutProvider Func<TimeSpan>
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(int)

public static TimeoutPolicy<TResult> Timeout<TResult>(int seconds)

Parameters

seconds int

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(int, TimeoutStrategy)

public static TimeoutPolicy<TResult> Timeout<TResult>(int seconds, TimeoutStrategy timeoutStrategy)

Parameters

seconds int
timeoutStrategy TimeoutStrategy

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(int, TimeoutStrategy, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy<TResult> Timeout<TResult>(int seconds, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

seconds int
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(int, TimeoutStrategy, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy<TResult> Timeout<TResult>(int seconds, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task> onTimeout)

Parameters

seconds int
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(int, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy<TResult> Timeout<TResult>(int seconds, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

seconds int
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(int, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy<TResult> Timeout<TResult>(int seconds, Action<Context, TimeSpan, Task> onTimeout)

Parameters

seconds int
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(TimeSpan)

public static TimeoutPolicy<TResult> Timeout<TResult>(TimeSpan timeout)

Parameters

timeout TimeSpan

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(TimeSpan, TimeoutStrategy)

public static TimeoutPolicy<TResult> Timeout<TResult>(TimeSpan timeout, TimeoutStrategy timeoutStrategy)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(TimeSpan, TimeoutStrategy, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy<TResult> Timeout<TResult>(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(TimeSpan, TimeoutStrategy, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy<TResult> Timeout<TResult>(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeout TimeSpan
timeoutStrategy TimeoutStrategy
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(TimeSpan, Action<Context, TimeSpan, Task, Exception>)

public static TimeoutPolicy<TResult> Timeout<TResult>(TimeSpan timeout, Action<Context, TimeSpan, Task, Exception> onTimeout)

Parameters

timeout TimeSpan
onTimeout Action<Context, TimeSpan, Task, Exception>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

Timeout<TResult>(TimeSpan, Action<Context, TimeSpan, Task>)

public static TimeoutPolicy<TResult> Timeout<TResult>(TimeSpan timeout, Action<Context, TimeSpan, Task> onTimeout)

Parameters

timeout TimeSpan
onTimeout Action<Context, TimeSpan, Task>

Returns

TimeoutPolicy<TResult>

Type Parameters

TResult

WithPolicyKey(string)

public Policy WithPolicyKey(string policyKey)

Parameters

policyKey string

Returns

Policy

Wrap(ISyncPolicy)

public PolicyWrap Wrap(ISyncPolicy innerPolicy)

Parameters

innerPolicy ISyncPolicy

Returns

PolicyWrap

Wrap(params ISyncPolicy[])

public static PolicyWrap Wrap(params ISyncPolicy[] policies)

Parameters

policies ISyncPolicy[]

Returns

PolicyWrap

WrapAsync(params IAsyncPolicy[])

public static AsyncPolicyWrap WrapAsync(params IAsyncPolicy[] policies)

Parameters

policies IAsyncPolicy[]

Returns

AsyncPolicyWrap

WrapAsync<TResult>(params IAsyncPolicy<TResult>[])

public static AsyncPolicyWrap<TResult> WrapAsync<TResult>(params IAsyncPolicy<TResult>[] policies)

Parameters

policies IAsyncPolicy<TResult>[]

Returns

AsyncPolicyWrap<TResult>

Type Parameters

TResult

Wrap<TResult>(ISyncPolicy<TResult>)

public PolicyWrap<TResult> Wrap<TResult>(ISyncPolicy<TResult> innerPolicy)

Parameters

innerPolicy ISyncPolicy<TResult>

Returns

PolicyWrap<TResult>

Type Parameters

TResult

Wrap<TResult>(params ISyncPolicy<TResult>[])

public static PolicyWrap<TResult> Wrap<TResult>(params ISyncPolicy<TResult>[] policies)

Parameters

policies ISyncPolicy<TResult>[]

Returns

PolicyWrap<TResult>

Type Parameters

TResult