Table of Contents

Class ApizrExtendedManagerOptionsBuilder

Namespace
Apizr.Extending.Configuring.Manager
Assembly
Apizr.Extensions.Microsoft.DependencyInjection.dll

Builder options available for extended registrations

public class ApizrExtendedManagerOptionsBuilder : IApizrExtendedManagerOptionsBuilder, IApizrExtendedManagerOptionsBuilder<IApizrExtendedManagerOptions, IApizrExtendedManagerOptionsBuilder>, IApizrExtendedManagerOptionsBuilderBase<IApizrExtendedManagerOptions, IApizrExtendedManagerOptionsBuilder>, IApizrGlobalManagerOptionsBuilderBase<IApizrExtendedManagerOptions, IApizrExtendedManagerOptionsBuilder>, IApizrExtendedManagerOptionsBuilderBase, IApizrGlobalManagerOptionsBuilderBase, IApizrExtendedCommonOptionsBuilder<IApizrExtendedManagerOptions, IApizrExtendedManagerOptionsBuilder>, IApizrExtendedCommonOptionsBuilderBase, IApizrGlobalCommonOptionsBuilderBase<IApizrExtendedManagerOptions, IApizrExtendedManagerOptionsBuilder>, IApizrGlobalCommonOptionsBuilderBase, IApizrExtendedProperOptionsBuilder<IApizrExtendedManagerOptions, IApizrExtendedManagerOptionsBuilder>, IApizrExtendedProperOptionsBuilderBase, IApizrGlobalProperOptionsBuilderBase<IApizrExtendedManagerOptions, IApizrExtendedManagerOptionsBuilder>, IApizrGlobalProperOptionsBuilderBase, IApizrExtendedSharedOptionsBuilder<IApizrExtendedManagerOptions, IApizrExtendedManagerOptionsBuilder>, IApizrExtendedSharedRegistrationOptionsBuilderBase, IApizrGlobalSharedRegistrationOptionsBuilderBase<IApizrExtendedManagerOptions, IApizrExtendedManagerOptionsBuilder>, IApizrGlobalSharedOptionsBuilderBase<IApizrExtendedManagerOptions, IApizrExtendedManagerOptionsBuilder>, IApizrGlobalSharedRegistrationOptionsBuilderBase, IApizrGlobalSharedOptionsBuilderBase
Inheritance
ApizrExtendedManagerOptionsBuilder
Implements
Inherited Members
Extension Methods

Constructors

ApizrExtendedManagerOptionsBuilder(ApizrExtendedManagerOptions)

public ApizrExtendedManagerOptionsBuilder(ApizrExtendedManagerOptions apizrOptions)

Parameters

apizrOptions ApizrExtendedManagerOptions

Fields

Options

protected readonly ApizrExtendedManagerOptions Options

Field Value

ApizrExtendedManagerOptions

Methods

ConfigureHttpClientBuilder(Action<IHttpClientBuilder>, ApizrDuplicateStrategy)

Adjust some HttpClient settings

public IApizrExtendedManagerOptionsBuilder ConfigureHttpClientBuilder(Action<IHttpClientBuilder> httpClientBuilder, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Merge)

Parameters

httpClientBuilder Action<IHttpClientBuilder>

The HttpClient builder

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another one already (default: Merge)

Returns

IApizrExtendedManagerOptionsBuilder

WithAuthenticationHandler(Func<HttpRequestMessage, string, CancellationToken, Task<string>>)

Provide a method to refresh the authorization token when needed

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler(Func<HttpRequestMessage, string, CancellationToken, Task<string>> refreshTokenFactory)

Parameters

refreshTokenFactory Func<HttpRequestMessage, string, CancellationToken, Task<string>>

Refresh token method called when expired or empty

Returns

IApizrExtendedManagerOptionsBuilder

WithAuthenticationHandler(Func<HttpRequestMessage, CancellationToken, Task<string>>)

Provide methods to only get the authorization constant token when needed

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler(Func<HttpRequestMessage, CancellationToken, Task<string>> getTokenFactory)

Parameters

getTokenFactory Func<HttpRequestMessage, CancellationToken, Task<string>>

The method called to get local constant token

Returns

IApizrExtendedManagerOptionsBuilder

WithAuthenticationHandler(Func<HttpRequestMessage, CancellationToken, Task<string>>, Func<HttpRequestMessage, string, CancellationToken, Task>)

Provide methods to get and set the authorization token when needed

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler(Func<HttpRequestMessage, CancellationToken, Task<string>> getTokenFactory, Func<HttpRequestMessage, string, CancellationToken, Task> setTokenFactory)

Parameters

getTokenFactory Func<HttpRequestMessage, CancellationToken, Task<string>>

The method called to get local token

setTokenFactory Func<HttpRequestMessage, string, CancellationToken, Task>

The method called to set local token

Returns

IApizrExtendedManagerOptionsBuilder

WithAuthenticationHandler(Func<HttpRequestMessage, CancellationToken, Task<string>>, Func<HttpRequestMessage, string, CancellationToken, Task>, Func<HttpRequestMessage, string, CancellationToken, Task<string>>)

Provide methods to get, set and refresh the authorization token when needed

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler(Func<HttpRequestMessage, CancellationToken, Task<string>> getTokenFactory, Func<HttpRequestMessage, string, CancellationToken, Task> setTokenFactory, Func<HttpRequestMessage, string, CancellationToken, Task<string>> refreshTokenFactory)

Parameters

getTokenFactory Func<HttpRequestMessage, CancellationToken, Task<string>>

The method called to get local token

setTokenFactory Func<HttpRequestMessage, string, CancellationToken, Task>

The method called to get local token

refreshTokenFactory Func<HttpRequestMessage, string, CancellationToken, Task<string>>

Refresh token method called when expired or empty

Returns

IApizrExtendedManagerOptionsBuilder

WithAuthenticationHandler(Type)

Provide your own AuthenticationHandlerBase generic implementation

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler(Type authenticationHandlerType)

Parameters

authenticationHandlerType Type

Your own AuthenticationHandlerBase generic implementation

Returns

IApizrExtendedManagerOptionsBuilder

WithAuthenticationHandler<TAuthenticationHandler>(Func<IServiceProvider, IApizrManagerOptionsBase, TAuthenticationHandler>)

Provide your own AuthenticationHandlerBase implementation

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler<TAuthenticationHandler>(Func<IServiceProvider, IApizrManagerOptionsBase, TAuthenticationHandler> authenticationHandlerFactory) where TAuthenticationHandler : AuthenticationHandlerBase

Parameters

authenticationHandlerFactory Func<IServiceProvider, IApizrManagerOptionsBase, TAuthenticationHandler>

A TAuthenticationHandler instance factory

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TAuthenticationHandler

Your AuthenticationHandlerBase implementation

WithAuthenticationHandler<TTokenService>(Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>>)

Provide your own token management services

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler<TTokenService>(Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>> refreshTokenExpression)

Parameters

refreshTokenExpression Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>>

The method called to refresh the token

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TTokenService

Your token management service (refreshing token)

WithAuthenticationHandler<TSettingsService>(Expression<Func<TSettingsService, HttpRequestMessage, CancellationToken, Task<string>>>)

Provide your own settings management service

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler<TSettingsService>(Expression<Func<TSettingsService, HttpRequestMessage, CancellationToken, Task<string>>> getTokenExpression)

Parameters

getTokenExpression Expression<Func<TSettingsService, HttpRequestMessage, CancellationToken, Task<string>>>

The get only token expression

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (getting constant token)

WithAuthenticationHandler<TSettingsService>(Expression<Func<TSettingsService, HttpRequestMessage, CancellationToken, Task<string>>>, Expression<Func<TSettingsService, HttpRequestMessage, string, CancellationToken, Task>>)

Provide your own settings management service

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler<TSettingsService>(Expression<Func<TSettingsService, HttpRequestMessage, CancellationToken, Task<string>>> getTokenExpression, Expression<Func<TSettingsService, HttpRequestMessage, string, CancellationToken, Task>> setTokenExpression)

Parameters

getTokenExpression Expression<Func<TSettingsService, HttpRequestMessage, CancellationToken, Task<string>>>

The get token expression

setTokenExpression Expression<Func<TSettingsService, HttpRequestMessage, string, CancellationToken, Task>>

The set token expression

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (saving/getting token)

WithAuthenticationHandler<TAuthService>(Expression<Func<TAuthService, HttpRequestMessage, CancellationToken, Task<string>>>, Expression<Func<TAuthService, HttpRequestMessage, string, CancellationToken, Task>>, Expression<Func<TAuthService, HttpRequestMessage, string, CancellationToken, Task<string>>>)

Provide your own settings management and token management services

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler<TAuthService>(Expression<Func<TAuthService, HttpRequestMessage, CancellationToken, Task<string>>> getTokenExpression, Expression<Func<TAuthService, HttpRequestMessage, string, CancellationToken, Task>> setTokenExpression, Expression<Func<TAuthService, HttpRequestMessage, string, CancellationToken, Task<string>>> refreshTokenExpression)

Parameters

getTokenExpression Expression<Func<TAuthService, HttpRequestMessage, CancellationToken, Task<string>>>

The get token expression

setTokenExpression Expression<Func<TAuthService, HttpRequestMessage, string, CancellationToken, Task>>

The set token expression

refreshTokenExpression Expression<Func<TAuthService, HttpRequestMessage, string, CancellationToken, Task<string>>>

The method called to refresh the token

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TAuthService

Your auth management service (saving/getting/refreshing token)

WithAuthenticationHandler<TSettingsService>(Expression<Func<TSettingsService, string>>)

Provide your own settings management service with its token source

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler<TSettingsService>(Expression<Func<TSettingsService, string>> tokenPropertyExpression)

Parameters

tokenPropertyExpression Expression<Func<TSettingsService, string>>

The token property to get from and set to

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (getting token)

WithAuthenticationHandler<TAuthService>(Expression<Func<TAuthService, string>>, Expression<Func<TAuthService, HttpRequestMessage, string, CancellationToken, Task<string>>>)

Provide your own auth management service

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler<TAuthService>(Expression<Func<TAuthService, string>> tokenPropertyExpression, Expression<Func<TAuthService, HttpRequestMessage, string, CancellationToken, Task<string>>> refreshTokenExpression)

Parameters

tokenPropertyExpression Expression<Func<TAuthService, string>>

The token property to get from and set to

refreshTokenExpression Expression<Func<TAuthService, HttpRequestMessage, string, CancellationToken, Task<string>>>

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TAuthService

Your auth management service (saving/getting/refreshing token)

WithAuthenticationHandler<TSettingsService, TTokenService>(Expression<Func<TSettingsService, HttpRequestMessage, CancellationToken, Task<string>>>, Expression<Func<TSettingsService, HttpRequestMessage, string, CancellationToken, Task>>, Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>>)

Provide your own settings management and token management services

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler<TSettingsService, TTokenService>(Expression<Func<TSettingsService, HttpRequestMessage, CancellationToken, Task<string>>> getTokenExpression, Expression<Func<TSettingsService, HttpRequestMessage, string, CancellationToken, Task>> setTokenExpression, Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>> refreshTokenExpression)

Parameters

getTokenExpression Expression<Func<TSettingsService, HttpRequestMessage, CancellationToken, Task<string>>>

The get token expression

setTokenExpression Expression<Func<TSettingsService, HttpRequestMessage, string, CancellationToken, Task>>

The set token expression

refreshTokenExpression Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>>

The method called to refresh the token

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (saving/getting token)

TTokenService

Your token management service (refreshing token)

WithAuthenticationHandler<TSettingsService, TTokenService>(Expression<Func<TSettingsService, string>>, Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>>)

Provide your own settings management and token management services

public IApizrExtendedManagerOptionsBuilder WithAuthenticationHandler<TSettingsService, TTokenService>(Expression<Func<TSettingsService, string>> tokenPropertyExpression, Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>> refreshTokenExpression)

Parameters

tokenPropertyExpression Expression<Func<TSettingsService, string>>

The token property to get from and set to

refreshTokenExpression Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>>

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (saving/getting token)

TTokenService

Your token management service (refreshing token)

WithBaseAddress(Func<IServiceProvider, string>, ApizrDuplicateStrategy)

Define your web api base address (could be defined with WebApiAttribute)

public IApizrExtendedManagerOptionsBuilder WithBaseAddress(Func<IServiceProvider, string> baseAddressFactory, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

baseAddressFactory Func<IServiceProvider, string>

Your web api base address factory

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

WithBaseAddress(Func<IServiceProvider, Uri>, ApizrDuplicateStrategy)

Define your web api base address (could be defined with WebApiAttribute)

public IApizrExtendedManagerOptionsBuilder WithBaseAddress(Func<IServiceProvider, Uri> baseAddressFactory, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

baseAddressFactory Func<IServiceProvider, Uri>

Your web api base address factory

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

WithBaseAddress(string, ApizrDuplicateStrategy)

Define your web api base address (could be defined with WebApiAttribute)

public IApizrExtendedManagerOptionsBuilder WithBaseAddress(string baseAddress, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

baseAddress string

Your web api base address

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

WithBaseAddress(Uri, ApizrDuplicateStrategy)

Define your web api base address (could be defined with WebApiAttribute)

public IApizrExtendedManagerOptionsBuilder WithBaseAddress(Uri baseAddress, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

baseAddress Uri

Your web api base address

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

WithBasePath(Func<IServiceProvider, string>, ApizrDuplicateStrategy)

Define your web api base path (could be defined with WebApiAttribute)

public IApizrExtendedManagerOptionsBuilder WithBasePath(Func<IServiceProvider, string> basePathFactory, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

basePathFactory Func<IServiceProvider, string>

Your web api base path factory

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

WithBasePath(string, ApizrDuplicateStrategy)

Define your web api base path (could be defined with WebApiAttribute)

public IApizrExtendedManagerOptionsBuilder WithBasePath(string basePath, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

basePath string

Your web api base path

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

WithCacheHandler(ICacheHandler)

Provide a cache handler to cache data

public IApizrExtendedManagerOptionsBuilder WithCacheHandler(ICacheHandler cacheHandler)

Parameters

cacheHandler ICacheHandler

An ICacheHandler mapping implementation instance

Returns

IApizrExtendedManagerOptionsBuilder

WithCacheHandler(Func<IServiceProvider, ICacheHandler>)

Provide a cache handler to cache data

public IApizrExtendedManagerOptionsBuilder WithCacheHandler(Func<IServiceProvider, ICacheHandler> cacheHandlerFactory)

Parameters

cacheHandlerFactory Func<IServiceProvider, ICacheHandler>

A ICacheHandler mapping implementation factory

Returns

IApizrExtendedManagerOptionsBuilder

WithCacheHandler(Type)

Provide a cache handler to cache data

public IApizrExtendedManagerOptionsBuilder WithCacheHandler(Type cacheHandlerType)

Parameters

cacheHandlerType Type

Type of your ICacheHandler mapping implementation

Returns

IApizrExtendedManagerOptionsBuilder

WithCacheHandler<TCacheHandler>()

Provide a cache handler to cache data

public IApizrExtendedManagerOptionsBuilder WithCacheHandler<TCacheHandler>() where TCacheHandler : class, ICacheHandler

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TCacheHandler

Your ICacheHandler mapping implementation

WithCaching(CacheMode, TimeSpan?, bool)

Cache data.

public IApizrExtendedManagerOptionsBuilder WithCaching(CacheMode mode = CacheMode.FetchOrGet, TimeSpan? lifeSpan = null, bool shouldInvalidateOnError = false)

Parameters

mode CacheMode

FetchOrGet returns fresh data when request succeed otherwise cached one, where GetOrFetch returns cached data if we get some otherwise fresh one

lifeSpan TimeSpan?

This specific caching lifetime (Default: null = cache handler lifetime

shouldInvalidateOnError bool

Should invalidate on error (Default: false)

Returns

IApizrExtendedManagerOptionsBuilder

WithConfiguration(IConfiguration)

Set options from configuration

public IApizrExtendedManagerOptionsBuilder WithConfiguration(IConfiguration configuration)

Parameters

configuration IConfiguration

The configuration to set options from

Returns

IApizrExtendedManagerOptionsBuilder

WithConfiguration(IConfigurationSection)

Set options from a specific configuration section

public IApizrExtendedManagerOptionsBuilder WithConfiguration(IConfigurationSection configurationSection)

Parameters

configurationSection IConfigurationSection

The configuration section to set options from

Returns

IApizrExtendedManagerOptionsBuilder

WithConnectivityHandler(IConnectivityHandler)

Provide a connectivity handler to check connectivity before sending a request

public IApizrExtendedManagerOptionsBuilder WithConnectivityHandler(IConnectivityHandler connectivityHandler)

Parameters

connectivityHandler IConnectivityHandler

An IConnectivityHandler mapping implementation instance

Returns

IApizrExtendedManagerOptionsBuilder

WithConnectivityHandler(Func<bool>)

Provide a function to invoke while checking connectivity

public IApizrExtendedManagerOptionsBuilder WithConnectivityHandler(Func<bool> connectivityCheckingFunction)

Parameters

connectivityCheckingFunction Func<bool>

A function to invoke while checking connectivity

Returns

IApizrExtendedManagerOptionsBuilder

WithConnectivityHandler(Func<IServiceProvider, IConnectivityHandler>)

Provide a connectivity handler to check connectivity before sending a request

public IApizrExtendedManagerOptionsBuilder WithConnectivityHandler(Func<IServiceProvider, IConnectivityHandler> connectivityHandlerFactory)

Parameters

connectivityHandlerFactory Func<IServiceProvider, IConnectivityHandler>

A IConnectivityHandler mapping implementation factory

Returns

IApizrExtendedManagerOptionsBuilder

WithConnectivityHandler(Type)

Provide a connectivity handler to check connectivity before sending a request

public IApizrExtendedManagerOptionsBuilder WithConnectivityHandler(Type connectivityHandlerType)

Parameters

connectivityHandlerType Type

Type of your IConnectivityHandler mapping implementation

Returns

IApizrExtendedManagerOptionsBuilder

WithConnectivityHandler<TConnectivityHandler>()

Provide a connectivity handler to check connectivity before sending a request

public IApizrExtendedManagerOptionsBuilder WithConnectivityHandler<TConnectivityHandler>() where TConnectivityHandler : class, IConnectivityHandler

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TConnectivityHandler

Your IConnectivityHandler mapping implementation

WithConnectivityHandler<TConnectivityHandler>(Expression<Func<TConnectivityHandler, bool>>)

Provide a connectivity handler to check connectivity before sending a request

public IApizrExtendedManagerOptionsBuilder WithConnectivityHandler<TConnectivityHandler>(Expression<Func<TConnectivityHandler, bool>> factory)

Parameters

factory Expression<Func<TConnectivityHandler, bool>>

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TConnectivityHandler

Your connectivity checking service

WithDelegatingHandler<THandler>(ApizrDuplicateStrategy)

Add a custom delegating handler inheriting from DelegatingHandler (serial call)

public IApizrExtendedManagerOptionsBuilder WithDelegatingHandler<THandler>(ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Add) where THandler : DelegatingHandler

Parameters

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Add)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

THandler

WithDelegatingHandler<THandler>(Func<IServiceProvider, IApizrManagerOptionsBase, THandler>, ApizrDuplicateStrategy)

Add a custom delegating handler inheriting from DelegatingHandler (serial call)

public IApizrExtendedManagerOptionsBuilder WithDelegatingHandler<THandler>(Func<IServiceProvider, IApizrManagerOptionsBase, THandler> delegatingHandlerFactory, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Add) where THandler : DelegatingHandler

Parameters

delegatingHandlerFactory Func<IServiceProvider, IApizrManagerOptionsBase, THandler>

A delegating handler factory

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Add)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

THandler

WithDelegatingHandler<THandler>(Func<IServiceProvider, THandler>, ApizrDuplicateStrategy)

Add a custom delegating handler inheriting from DelegatingHandler (serial call)

public IApizrExtendedManagerOptionsBuilder WithDelegatingHandler<THandler>(Func<IServiceProvider, THandler> delegatingHandlerFactory, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Add) where THandler : DelegatingHandler

Parameters

delegatingHandlerFactory Func<IServiceProvider, THandler>

A delegating handler factory

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Add)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

THandler

WithDelegatingHandler<THandler>(THandler, ApizrDuplicateStrategy)

Add a custom delegating handler inheriting from DelegatingHandler (serial call)

public IApizrExtendedManagerOptionsBuilder WithDelegatingHandler<THandler>(THandler delegatingHandler, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Add) where THandler : DelegatingHandler

Parameters

delegatingHandler THandler

A delegating handler

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Add)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

THandler

WithExCatching(Action<ApizrException>, bool, ApizrDuplicateStrategy)

Catch potential exceptions

[Obsolete("Catching an exception by an Action is now replaced by a Func returning a handled boolean flag")]
public IApizrExtendedManagerOptionsBuilder WithExCatching(Action<ApizrException> onException, bool letThrowOnException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

onException Action<ApizrException>

The exception callback

letThrowOnException bool

Let throw potential exception (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

WithExCatching(Func<ApizrException, bool>, bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrExtendedManagerOptionsBuilder WithExCatching(Func<ApizrException, bool> onException, bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

onException Func<ApizrException, bool>

The exception callback returning handled boolean flag

letThrowOnHandledException bool

Let throw potential exception even if it's handled (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

WithExCatching(Func<ApizrException, Task<bool>>, bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrExtendedManagerOptionsBuilder WithExCatching(Func<ApizrException, Task<bool>> onException, bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

onException Func<ApizrException, Task<bool>>

The exception callback returning handled boolean flag Task

letThrowOnHandledException bool

Let throw potential exception even if it's handled (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

WithExCatching(Func<IServiceProvider, ApizrException, bool>, bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrExtendedManagerOptionsBuilder WithExCatching(Func<IServiceProvider, ApizrException, bool> onException, bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

onException Func<IServiceProvider, ApizrException, bool>

The exception callback returning handled boolean flag

letThrowOnHandledException bool

Let throw potential exception even if it's handled (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

WithExCatching(Func<IServiceProvider, ApizrException, Task<bool>>, bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrExtendedManagerOptionsBuilder WithExCatching(Func<IServiceProvider, ApizrException, Task<bool>> onException, bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

onException Func<IServiceProvider, ApizrException, Task<bool>>

The exception callback returning a handled boolean flag Task

letThrowOnHandledException bool

Let throw potential exception even if it's handled (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

WithExCatching<TResult>(Action<ApizrException<TResult>>, bool, ApizrDuplicateStrategy)

Catch potential exceptions

[Obsolete("Catching an exception by an Action is now replaced by a Func returning a handled boolean flag")]
public IApizrExtendedManagerOptionsBuilder WithExCatching<TResult>(Action<ApizrException<TResult>> onException, bool letThrowOnException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

onException Action<ApizrException<TResult>>

The exception callback

letThrowOnException bool

Let throw potential exception (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TResult

WithExCatching<THandler>(bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrExtendedManagerOptionsBuilder WithExCatching<THandler>(bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace) where THandler : IApizrExceptionHandler

Parameters

letThrowOnHandledException bool

Let throw potential exception even if it's handled (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

THandler

WithExCatching<TResult>(Func<ApizrException<TResult>, bool>, bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrExtendedManagerOptionsBuilder WithExCatching<TResult>(Func<ApizrException<TResult>, bool> onException, bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

onException Func<ApizrException<TResult>, bool>

The exception callback returning handled boolean flag

letThrowOnHandledException bool

Let throw potential exception even if it's handled (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TResult

WithExCatching<TResult>(Func<ApizrException<TResult>, Task<bool>>, bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrExtendedManagerOptionsBuilder WithExCatching<TResult>(Func<ApizrException<TResult>, Task<bool>> onException, bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

onException Func<ApizrException<TResult>, Task<bool>>

The exception callback returning a handled boolean flag Task

letThrowOnHandledException bool

Let throw potential exception even if it's handled (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TResult

WithExCatching<TResult>(Func<IServiceProvider, ApizrException<TResult>, bool>, bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrExtendedManagerOptionsBuilder WithExCatching<TResult>(Func<IServiceProvider, ApizrException<TResult>, bool> onException, bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

onException Func<IServiceProvider, ApizrException<TResult>, bool>

The exception callback returning handled boolean flag

letThrowOnHandledException bool

Let throw potential exception even if it's handled (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TResult

WithExCatching<TResult>(Func<IServiceProvider, ApizrException<TResult>, Task<bool>>, bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrExtendedManagerOptionsBuilder WithExCatching<TResult>(Func<IServiceProvider, ApizrException<TResult>, Task<bool>> onException, bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)

Parameters

onException Func<IServiceProvider, ApizrException<TResult>, Task<bool>>

The exception callback returning a handled boolean flag Task

letThrowOnHandledException bool

Let throw potential exception even if it's handled (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TResult

WithExCatching<THandler>(Func<IServiceProvider, THandler>, bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrExtendedManagerOptionsBuilder WithExCatching<THandler>(Func<IServiceProvider, THandler> exceptionHandlerFactory, bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace) where THandler : IApizrExceptionHandler

Parameters

exceptionHandlerFactory Func<IServiceProvider, THandler>

The exception handler called back and returning handled boolean flag Task

letThrowOnHandledException bool

Let throw potential exception even if it's handled (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

THandler

WithExCatching<THandler>(THandler, bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrExtendedManagerOptionsBuilder WithExCatching<THandler>(THandler exceptionHandler, bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace) where THandler : IApizrExceptionHandler

Parameters

exceptionHandler THandler

The exception handler called back and returning handled boolean flag Task

letThrowOnHandledException bool

Let throw potential exception even if it's handled (default: true)

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another callback already (default: Replace)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

THandler

WithHandlerParameter(string, object)

Set some parameters passed through all delegating handlers

public IApizrExtendedManagerOptionsBuilder WithHandlerParameter(string key, object value)

Parameters

key string

The parameter's key

value object

The parameter's value

Returns

IApizrExtendedManagerOptionsBuilder

WithHeaders(IList<string>, ApizrDuplicateStrategy, ApizrRegistrationMode)

Add some headers to the request

public IApizrExtendedManagerOptionsBuilder WithHeaders(IList<string> headers, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Add, ApizrRegistrationMode mode = ApizrRegistrationMode.Set)

Parameters

headers IList<string>

Headers to add to the request

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Add)

mode ApizrRegistrationMode

Set headers right the way or store it for further attribute key match use (default: Set)

Returns

IApizrExtendedManagerOptionsBuilder

WithHeaders(Func<IServiceProvider, IList<string>>, ApizrDuplicateStrategy, ApizrLifetimeScope, ApizrRegistrationMode)

Add some headers to the request

public IApizrExtendedManagerOptionsBuilder WithHeaders(Func<IServiceProvider, IList<string>> headersFactory, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Add, ApizrLifetimeScope scope = ApizrLifetimeScope.Api, ApizrRegistrationMode mode = ApizrRegistrationMode.Set)

Parameters

headersFactory Func<IServiceProvider, IList<string>>

Headers to add to the request

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another one already (default: Add)

scope ApizrLifetimeScope

Tells Apizr if you want to refresh or not headers values at request time (default: Api = no refresh)

mode ApizrRegistrationMode

Set headers right the way or store it for further attribute key match use (default: Set)

Returns

IApizrExtendedManagerOptionsBuilder

WithHeaders<TSettingsService>(Expression<Func<TSettingsService, string>>[], ApizrDuplicateStrategy, ApizrLifetimeScope, ApizrRegistrationMode)

Add some headers to the request loaded from service properties

public IApizrExtendedManagerOptionsBuilder WithHeaders<TSettingsService>(Expression<Func<TSettingsService, string>>[] headerProperties, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Add, ApizrLifetimeScope scope = ApizrLifetimeScope.Api, ApizrRegistrationMode mode = ApizrRegistrationMode.Set)

Parameters

headerProperties Expression<Func<TSettingsService, string>>[]

The header properties to get from

strategy ApizrDuplicateStrategy

The duplicate strategy if there's another one already (default: Add)

scope ApizrLifetimeScope

Tells Apizr if you want to refresh or not headers values at request time (default: Api = no refresh)

mode ApizrRegistrationMode

Set headers right the way or store it for further attribute key match use (default: Set)

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (getting headers)

WithHttpClientHandler(Func<IServiceProvider, HttpClientHandler>)

Provide a custom HttpClientHandler

public IApizrExtendedManagerOptionsBuilder WithHttpClientHandler(Func<IServiceProvider, HttpClientHandler> httpClientHandlerFactory)

Parameters

httpClientHandlerFactory Func<IServiceProvider, HttpClientHandler>

An HttpClientHandler instance factory

Returns

IApizrExtendedManagerOptionsBuilder

WithHttpClientHandler(HttpClientHandler)

Provide a custom HttpClientHandler

public IApizrExtendedManagerOptionsBuilder WithHttpClientHandler(HttpClientHandler httpClientHandler)

Parameters

httpClientHandler HttpClientHandler

An HttpClientHandler instance

Returns

IApizrExtendedManagerOptionsBuilder

WithHttpMessageHandler<THandler>()

Add a custom http message handler inheriting from HttpMessageHandler (last call)

public IApizrExtendedManagerOptionsBuilder WithHttpMessageHandler<THandler>() where THandler : HttpMessageHandler

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

THandler

WithHttpMessageHandler<THandler>(Func<IServiceProvider, IApizrManagerOptionsBase, THandler>)

Add a custom http message handler inheriting from HttpMessageHandler (last call)

public IApizrExtendedManagerOptionsBuilder WithHttpMessageHandler<THandler>(Func<IServiceProvider, IApizrManagerOptionsBase, THandler> httpMessageHandlerFactory) where THandler : HttpMessageHandler

Parameters

httpMessageHandlerFactory Func<IServiceProvider, IApizrManagerOptionsBase, THandler>

A http message handler factory

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

THandler

WithHttpMessageHandler<THandler>(Func<IServiceProvider, THandler>)

Add a custom http message handler inheriting from HttpMessageHandler (last call)

public IApizrExtendedManagerOptionsBuilder WithHttpMessageHandler<THandler>(Func<IServiceProvider, THandler> httpMessageHandlerFactory) where THandler : HttpMessageHandler

Parameters

httpMessageHandlerFactory Func<IServiceProvider, THandler>

A http message handler factory

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

THandler

WithHttpMessageHandler<THandler>(THandler)

Add a custom http message handler inheriting from HttpMessageHandler (last call)

public IApizrExtendedManagerOptionsBuilder WithHttpMessageHandler<THandler>(THandler httpMessageHandler) where THandler : HttpMessageHandler

Parameters

httpMessageHandler THandler

A http message handler

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

THandler

WithLoggedHeadersRedactionNames(IEnumerable<string>, ApizrDuplicateStrategy)

Sets the collection of HTTP headers names for which values should be redacted before logging.

public IApizrExtendedManagerOptionsBuilder WithLoggedHeadersRedactionNames(IEnumerable<string> redactedLoggedHeaderNames, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Add)

Parameters

redactedLoggedHeaderNames IEnumerable<string>

The collection of HTTP headers names for which values should be redacted before logging.

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other names already (default: Add)

Returns

IApizrExtendedManagerOptionsBuilder

WithLoggedHeadersRedactionRule(Func<string, bool>, ApizrDuplicateStrategy)

Sets the Func<T, TResult> which determines whether to redact the HTTP header value before logging.

public IApizrExtendedManagerOptionsBuilder WithLoggedHeadersRedactionRule(Func<string, bool> shouldRedactHeaderValue, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Add)

Parameters

shouldRedactHeaderValue Func<string, bool>

The Func<T, TResult> which determines whether to redact the HTTP header value before logging

strategy ApizrDuplicateStrategy

The duplicate strategy if there's any other names already (default: Add)

Returns

IApizrExtendedManagerOptionsBuilder

WithLogging(HttpTracerMode, HttpMessageParts, params LogLevel[])

Define tracer mode, http traffic tracing verbosity and log levels (could be defined with LogAttribute)

public IApizrExtendedManagerOptionsBuilder WithLogging(HttpTracerMode httpTracerMode = HttpTracerMode.Everything, HttpMessageParts trafficVerbosity = HttpMessageParts.All, params LogLevel[] logLevels)

Parameters

httpTracerMode HttpTracerMode
trafficVerbosity HttpMessageParts

Http traffic tracing verbosity (default: All)

logLevels LogLevel[]

Log levels to apply while writing (default: Information)

Returns

IApizrExtendedManagerOptionsBuilder

WithLogging(Func<IServiceProvider, HttpTracerMode>, Func<IServiceProvider, HttpMessageParts>, Func<IServiceProvider, LogLevel[]>)

Define tracer mode, http traffic tracing verbosity and log levels (could be defined with LogAttribute)

public IApizrExtendedManagerOptionsBuilder WithLogging(Func<IServiceProvider, HttpTracerMode> httpTracerModeFactory, Func<IServiceProvider, HttpMessageParts> trafficVerbosityFactory, Func<IServiceProvider, LogLevel[]> logLevelFactory)

Parameters

httpTracerModeFactory Func<IServiceProvider, HttpTracerMode>

Http traffic tracing mode factory

trafficVerbosityFactory Func<IServiceProvider, HttpMessageParts>

Http traffic tracing verbosity factory

logLevelFactory Func<IServiceProvider, LogLevel[]>

Returns

IApizrExtendedManagerOptionsBuilder

WithLogging(Func<IServiceProvider, (HttpTracerMode, HttpMessageParts, LogLevel[])>)

Define tracer mode, http traffic tracing verbosity and log levels (could be defined with LogAttribute)

public IApizrExtendedManagerOptionsBuilder WithLogging(Func<IServiceProvider, (HttpTracerMode, HttpMessageParts, LogLevel[])> loggingConfigurationFactory)

Parameters

loggingConfigurationFactory Func<IServiceProvider, (HttpTracerMode, HttpMessageParts, LogLevel[])>

Logging configuration factory

Returns

IApizrExtendedManagerOptionsBuilder

WithMappingHandler(IMappingHandler)

Provide a mapping handler to map entities

public IApizrExtendedManagerOptionsBuilder WithMappingHandler(IMappingHandler mappingHandler)

Parameters

mappingHandler IMappingHandler

An IMappingHandler mapping implementation instance

Returns

IApizrExtendedManagerOptionsBuilder

WithMappingHandler(Func<IServiceProvider, IMappingHandler>)

Provide a mapping handler to auto map entities during mediation

public IApizrExtendedManagerOptionsBuilder WithMappingHandler(Func<IServiceProvider, IMappingHandler> mappingHandlerFactory)

Parameters

mappingHandlerFactory Func<IServiceProvider, IMappingHandler>

A IMappingHandler mapping implementation factory

Returns

IApizrExtendedManagerOptionsBuilder

WithMappingHandler(Type)

Provide a mapping handler to auto map entities during mediation

public IApizrExtendedManagerOptionsBuilder WithMappingHandler(Type mappingHandlerType)

Parameters

mappingHandlerType Type

Type of your IMappingHandler mapping implementation

Returns

IApizrExtendedManagerOptionsBuilder

WithMappingHandler<TMappingHandler>()

Provide a mapping handler to auto map entities during mediation

public IApizrExtendedManagerOptionsBuilder WithMappingHandler<TMappingHandler>() where TMappingHandler : class, IMappingHandler

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TMappingHandler

Your IMappingHandler mapping implementation

WithOperationTimeout(Func<IServiceProvider, TimeSpan>)

Set a timeout to the operation (overall request tries)

public IApizrExtendedManagerOptionsBuilder WithOperationTimeout(Func<IServiceProvider, TimeSpan> timeoutFactory)

Parameters

timeoutFactory Func<IServiceProvider, TimeSpan>

The operation timeout factory

Returns

IApizrExtendedManagerOptionsBuilder

WithOperationTimeout(TimeSpan)

Set a timeout to the operation (overall request tries)

public IApizrExtendedManagerOptionsBuilder WithOperationTimeout(TimeSpan timeout)

Parameters

timeout TimeSpan

The operation timeout

Returns

IApizrExtendedManagerOptionsBuilder

WithRefitSettings(RefitSettings)

Provide some Refit specific settings

public IApizrExtendedManagerOptionsBuilder WithRefitSettings(RefitSettings refitSettings)

Parameters

refitSettings RefitSettings

A Refit.RefitSettings instance

Returns

IApizrExtendedManagerOptionsBuilder

WithRefitSettings(Func<IServiceProvider, RefitSettings>)

Provide some Refit specific settings

public IApizrExtendedManagerOptionsBuilder WithRefitSettings(Func<IServiceProvider, RefitSettings> refitSettingsFactory)

Parameters

refitSettingsFactory Func<IServiceProvider, RefitSettings>

A Refit.RefitSettings instance factory

Returns

IApizrExtendedManagerOptionsBuilder

WithRequestOptions(string, Action<IApizrRequestOptionsBuilder>, ApizrDuplicateStrategy)

Configure options for specific requests

public IApizrExtendedManagerOptionsBuilder WithRequestOptions(string requestName, Action<IApizrRequestOptionsBuilder> optionsBuilder, ApizrDuplicateStrategy duplicateStrategy = ApizrDuplicateStrategy.Add)

Parameters

requestName string

The name of the request to configure

optionsBuilder Action<IApizrRequestOptionsBuilder>

The configuration builder

duplicateStrategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Add)

Returns

IApizrExtendedManagerOptionsBuilder

WithRequestOptions(string[], Action<IApizrRequestOptionsBuilder>, ApizrDuplicateStrategy)

Configure options for specific requests

public IApizrExtendedManagerOptionsBuilder WithRequestOptions(string[] requestNames, Action<IApizrRequestOptionsBuilder> optionsBuilder, ApizrDuplicateStrategy duplicateStrategy = ApizrDuplicateStrategy.Add)

Parameters

requestNames string[]

The name of the requests to configure

optionsBuilder Action<IApizrRequestOptionsBuilder>

The configuration builder

duplicateStrategy ApizrDuplicateStrategy

The duplicate strategy if there's any other already (default: Add)

Returns

IApizrExtendedManagerOptionsBuilder

WithRequestTimeout(Func<IServiceProvider, TimeSpan>)

Set a timeout to the request (each request try)

public IApizrExtendedManagerOptionsBuilder WithRequestTimeout(Func<IServiceProvider, TimeSpan> timeoutFactory)

Parameters

timeoutFactory Func<IServiceProvider, TimeSpan>

The request timeout factory

Returns

IApizrExtendedManagerOptionsBuilder

WithRequestTimeout(TimeSpan)

Set a timeout to the request (each request try)

public IApizrExtendedManagerOptionsBuilder WithRequestTimeout(TimeSpan timeout)

Parameters

timeout TimeSpan

The request timeout

Returns

IApizrExtendedManagerOptionsBuilder

WithResilienceContextOptions(Action<IApizrResilienceContextOptionsBuilder>)

Set some options to the resilience context

public IApizrExtendedManagerOptionsBuilder WithResilienceContextOptions(Action<IApizrResilienceContextOptionsBuilder> contextOptionsBuilder)

Parameters

contextOptionsBuilder Action<IApizrResilienceContextOptionsBuilder>

The resilience context options builder

Returns

IApizrExtendedManagerOptionsBuilder

WithResiliencePipelineKeys(string[], IEnumerable<ApizrRequestMethod>, ApizrDuplicateStrategy)

Apply some resilience strategies by getting pipelines from registry with key matching.

public IApizrExtendedManagerOptionsBuilder WithResiliencePipelineKeys(string[] resiliencePipelineKeys, IEnumerable<ApizrRequestMethod> methodScope = null, ApizrDuplicateStrategy duplicateStrategy = ApizrDuplicateStrategy.Add)

Parameters

resiliencePipelineKeys string[]

Resilience pipeline keys from the registry.

methodScope IEnumerable<ApizrRequestMethod>

Http or Crud methods to apply pipelines on (default: null = All)

duplicateStrategy ApizrDuplicateStrategy

The duplicate strategy if there's any other names already (default: Add)

Returns

IApizrExtendedManagerOptionsBuilder

WithResilienceProperty<TValue>(ResiliencePropertyKey<TValue>, Func<IServiceProvider, TValue>)

Set some resilience properties to the resilience context

public IApizrExtendedManagerOptionsBuilder WithResilienceProperty<TValue>(ResiliencePropertyKey<TValue> key, Func<IServiceProvider, TValue> valueFactory)

Parameters

key ResiliencePropertyKey<TValue>

The resilience property's key

valueFactory Func<IServiceProvider, TValue>

The resilience property's value factory

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TValue

WithResilienceProperty<TValue>(ResiliencePropertyKey<TValue>, TValue)

Set some resilience properties to the resilience context

public IApizrExtendedManagerOptionsBuilder WithResilienceProperty<TValue>(ResiliencePropertyKey<TValue> key, TValue value)

Parameters

key ResiliencePropertyKey<TValue>

The resilience property's key

value TValue

The resilience property's value

Returns

IApizrExtendedManagerOptionsBuilder

Type Parameters

TValue