Table of Contents

Class ApizrManagerOptionsBuilder

Namespace
Apizr.Configuring.Manager
Assembly
Apizr.dll

Builder options available for static registrations

public class ApizrManagerOptionsBuilder : IApizrManagerOptionsBuilder, IApizrManagerOptionsBuilder<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrManagerOptionsBuilderBase<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrGlobalManagerOptionsBuilderBase<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrManagerOptionsBuilderBase, IApizrGlobalManagerOptionsBuilderBase, IApizrCommonOptionsBuilder<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrCommonOptionsBuilderBase<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrGlobalCommonOptionsBuilderBase<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrCommonOptionsBuilderBase, IApizrGlobalCommonOptionsBuilderBase, IApizrProperOptionsBuilder<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrProperOptionsBuilderBase<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrGlobalProperOptionsBuilderBase<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrProperOptionsBuilderBase, IApizrGlobalProperOptionsBuilderBase, IApizrSharedRegistrationOptionsBuilder<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrSharedRegistrationOptionsBuilderBase<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrGlobalSharedRegistrationOptionsBuilderBase<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrGlobalSharedOptionsBuilderBase<IApizrManagerOptions, IApizrManagerOptionsBuilder>, IApizrSharedRegistrationOptionsBuilder, IApizrSharedRegistrationOptionsBuilderBase, IApizrGlobalSharedRegistrationOptionsBuilderBase, IApizrGlobalSharedOptionsBuilderBase
Inheritance
ApizrManagerOptionsBuilder
Implements
Inherited Members
Extension Methods

Fields

Options

The options

protected readonly ApizrManagerOptions Options

Field Value

ApizrManagerOptions

Methods

ConfigureHttpClient(Action<HttpClient>, ApizrDuplicateStrategy)

Configure HttpClient

public IApizrManagerOptionsBuilder ConfigureHttpClient(Action<HttpClient> configureHttpClient, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Merge)

Parameters

configureHttpClient Action<HttpClient>

The configuration builder

strategy ApizrDuplicateStrategy

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

Returns

IApizrManagerOptionsBuilder

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

Provide a method to refresh the authorization token when needed

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

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

Provide methods to only get the authorization constant token when needed

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

Parameters

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

The method called to get local constant token

Returns

IApizrManagerOptionsBuilder

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

Provide methods to get and set the authorization token when needed

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

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

IApizrManagerOptionsBuilder

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

Provide your own AuthenticationHandlerBase implementation factory

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

Parameters

authenticationHandlerFactory Func<IApizrManagerOptionsBase, TAuthenticationHandler>

A TAuthenticationHandler instance factory

Returns

IApizrManagerOptionsBuilder

Type Parameters

TAuthenticationHandler

Your AuthenticationHandlerBase implementation

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

Provide your own token management services

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

Parameters

tokenServiceFactory Func<TTokenService>

A TTokenService instance factory

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

The method called to refresh the token

Returns

IApizrManagerOptionsBuilder

Type Parameters

TTokenService

Your token management service (refreshing token)

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

Provide your own settings management service

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

Parameters

settingsServiceFactory Func<TSettingsService>

A TSettingsService instance factory

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

The get only token expression

Returns

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (getting constant token)

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

Provide your own settings management service

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

Parameters

settingsServiceFactory Func<TSettingsService>

A TSettingsService instance factory

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

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (saving/getting token)

WithAuthenticationHandler<TAuthService>(Func<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 auth management service

public IApizrManagerOptionsBuilder WithAuthenticationHandler<TAuthService>(Func<TAuthService> authServiceFactory, 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

authServiceFactory Func<TAuthService>

A TAuthService instance factory

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

IApizrManagerOptionsBuilder

Type Parameters

TAuthService

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

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

Provide your own settings management service with its token source

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

Parameters

settingsServiceFactory Func<TSettingsService>

A TSettingsService instance factory

tokenPropertyExpression Expression<Func<TSettingsService, string>>

The token property to get from and set to

Returns

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (getting token)

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

Provide your own auth management service

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

Parameters

authServiceFactory Func<TAuthService>

A TAuthService instance factory

tokenPropertyExpression Expression<Func<TAuthService, string>>

The token property to get from and set to

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

Returns

IApizrManagerOptionsBuilder

Type Parameters

TAuthService

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

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

Provide your own token management services

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

Parameters

tokenService TTokenService

A TTokenService instance

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

The method called to refresh the token

Returns

IApizrManagerOptionsBuilder

Type Parameters

TTokenService

Your token management service (refreshing token)

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

Provide your own settings management service

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

Parameters

settingsService TSettingsService

A TSettingsService instance

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

The get only token expression

Returns

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (getting constant token)

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

Provide your own settings management service

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

Parameters

settingsService TSettingsService

A TSettingsService instance

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

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (saving/getting token)

WithAuthenticationHandler<TAuthService>(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 IApizrManagerOptionsBuilder WithAuthenticationHandler<TAuthService>(TAuthService authService, 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

authService TAuthService

A TAuthService instance

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

IApizrManagerOptionsBuilder

Type Parameters

TAuthService

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

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

Provide your own settings management service with its token source

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

Parameters

settingsService TSettingsService

A TSettingsService instance

tokenPropertyExpression Expression<Func<TSettingsService, string>>

The token property to get from and set to

Returns

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (getting token)

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

Provide your own auth management service

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

Parameters

authService TAuthService

A TAuthService instance

tokenPropertyExpression Expression<Func<TAuthService, string>>

The token property to get from and set to

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

Returns

IApizrManagerOptionsBuilder

Type Parameters

TAuthService

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

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

Provide your own settings management and token management services

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

Parameters

settingsServiceFactory Func<TSettingsService>

A TSettingsService instance factory

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

The get token expression

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

The set token expression

tokenServiceFactory Func<TTokenService>

A TTokenService instance factory

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

The method called to refresh the token

Returns

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (saving/getting token)

TTokenService

Your token management service (refreshing token)

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

Provide your own settings management and token management services

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

Parameters

settingsServiceFactory Func<TSettingsService>

A TSettingsService instance factory

tokenPropertyExpression Expression<Func<TSettingsService, string>>

The token property to get from and set to

tokenServiceFactory Func<TTokenService>

A TTokenService instance factory

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

Returns

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (saving/getting token)

TTokenService

Your token management service (refreshing token)

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

Provide your own settings management and token management services

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

Parameters

settingsService TSettingsService

A TSettingsService instance

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

The get token expression

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

The set token expression

tokenService TTokenService

A TTokenService instance

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

The method called to refresh the token

Returns

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (saving/getting token)

TTokenService

Your token management service (refreshing token)

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

Provide your own settings management and token management services

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

Parameters

settingsService TSettingsService

A TSettingsService instance

tokenPropertyExpression Expression<Func<TSettingsService, string>>

The token property to get from and set to

tokenService TTokenService

A TTokenService instance

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

Returns

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (saving/getting token)

TTokenService

Your token management service (refreshing token)

WithBaseAddress(Func<string>, ApizrDuplicateStrategy)

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

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

Parameters

baseAddressFactory Func<string>

Your web api base address factory

strategy ApizrDuplicateStrategy

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

Returns

IApizrManagerOptionsBuilder

WithBaseAddress(Func<Uri>, ApizrDuplicateStrategy)

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

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

Parameters

baseAddressFactory Func<Uri>

Your web api base address factory

strategy ApizrDuplicateStrategy

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

Returns

IApizrManagerOptionsBuilder

WithBaseAddress(string, ApizrDuplicateStrategy)

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

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

WithBaseAddress(Uri, ApizrDuplicateStrategy)

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

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

WithBasePath(Func<string>, ApizrDuplicateStrategy)

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

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

Parameters

basePathFactory Func<string>

Your web api base path factory

strategy ApizrDuplicateStrategy

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

Returns

IApizrManagerOptionsBuilder

WithBasePath(string, ApizrDuplicateStrategy)

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

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

WithCacheHandler(ICacheHandler)

Provide a cache handler to cache data

public IApizrManagerOptionsBuilder WithCacheHandler(ICacheHandler cacheHandler)

Parameters

cacheHandler ICacheHandler

An ICacheHandler mapping implementation instance

Returns

IApizrManagerOptionsBuilder

WithCacheHandler(Func<ICacheHandler>)

Provide a cache handler to cache data

public IApizrManagerOptionsBuilder WithCacheHandler(Func<ICacheHandler> cacheHandlerFactory)

Parameters

cacheHandlerFactory Func<ICacheHandler>

An ICacheHandler mapping implementation instance factory

Returns

IApizrManagerOptionsBuilder

WithCaching(CacheMode, TimeSpan?, bool)

Cache data.

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

WithConfiguration(IConfiguration)

Set options from configuration

public IApizrManagerOptionsBuilder WithConfiguration(IConfiguration configuration)

Parameters

configuration IConfiguration

The configuration to set options from

Returns

IApizrManagerOptionsBuilder

WithConfiguration(IConfigurationSection)

Set options from a specific configuration section

public IApizrManagerOptionsBuilder WithConfiguration(IConfigurationSection configurationSection)

Parameters

configurationSection IConfigurationSection

The configuration section to set options from

Returns

IApizrManagerOptionsBuilder

WithConnectivityHandler(IConnectivityHandler)

Provide a connectivity handler to check connectivity before sending a request

public IApizrManagerOptionsBuilder WithConnectivityHandler(IConnectivityHandler connectivityHandler)

Parameters

connectivityHandler IConnectivityHandler

An IConnectivityHandler mapping implementation instance

Returns

IApizrManagerOptionsBuilder

WithConnectivityHandler(Func<IConnectivityHandler>)

Provide a connectivity handler

public IApizrManagerOptionsBuilder WithConnectivityHandler(Func<IConnectivityHandler> connectivityHandlerFactory)

Parameters

connectivityHandlerFactory Func<IConnectivityHandler>

An IConnectivityHandler mapping implementation instance factory

Returns

IApizrManagerOptionsBuilder

WithConnectivityHandler(Func<bool>)

Provide a function to invoke while checking connectivity

public IApizrManagerOptionsBuilder WithConnectivityHandler(Func<bool> connectivityCheckingFunction)

Parameters

connectivityCheckingFunction Func<bool>

A function to invoke while checking connectivity

Returns

IApizrManagerOptionsBuilder

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

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

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

Parameters

delegatingHandlerFactory Func<IApizrManagerOptionsBase, THandler>

A delegating handler factory

strategy ApizrDuplicateStrategy

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

Returns

IApizrManagerOptionsBuilder

Type Parameters

THandler

WithDelegatingHandler<THandler>(THandler, ApizrDuplicateStrategy)

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

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

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

IApizrManagerOptionsBuilder

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

Catch potential exceptions

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

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

Catch potential exceptions

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

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

IApizrManagerOptionsBuilder

Type Parameters

TResult

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

Catch potential exceptions

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

Type Parameters

TResult

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

Catch potential exceptions

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

Type Parameters

TResult

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

Catch potential exceptions

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

Parameters

exceptionHandlerFactory Func<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

IApizrManagerOptionsBuilder

Type Parameters

THandler

WithExCatching<THandler>(THandler, bool, ApizrDuplicateStrategy)

Catch potential exceptions

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

Type Parameters

THandler

WithHandlerParameter(string, object)

Set some parameters passed through all delegating handlers

public IApizrManagerOptionsBuilder WithHandlerParameter(string key, object value)

Parameters

key string

The parameter's key

value object

The parameter's value

Returns

IApizrManagerOptionsBuilder

WithHeaders(IList<string>, ApizrDuplicateStrategy, ApizrRegistrationMode)

Add some headers to the request

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

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

Add some headers to the request

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

Parameters

headersFactory Func<IList<string>>

Headers factory

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

IApizrManagerOptionsBuilder

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

Add some headers to the request loaded from service properties

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

Parameters

settingsServiceFactory Func<TSettingsService>

A TSettingsService instance factory

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

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (getting headers)

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

Add some headers to the request loaded from service properties

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

Parameters

settingsService TSettingsService

A TSettingsService instance

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

IApizrManagerOptionsBuilder

Type Parameters

TSettingsService

Your settings management service (getting headers)

WithHttpClientHandler(Func<HttpClientHandler>)

Provide a custom HttpClientHandler

public IApizrManagerOptionsBuilder WithHttpClientHandler(Func<HttpClientHandler> httpClientHandlerFactory)

Parameters

httpClientHandlerFactory Func<HttpClientHandler>

An HttpClientHandler instance factory

Returns

IApizrManagerOptionsBuilder

WithHttpClientHandler(HttpClientHandler)

Provide a custom HttpClientHandler

public IApizrManagerOptionsBuilder WithHttpClientHandler(HttpClientHandler httpClientHandler)

Parameters

httpClientHandler HttpClientHandler

An HttpClientHandler instance

Returns

IApizrManagerOptionsBuilder

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

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

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

Parameters

httpMessageHandlerFactory Func<IApizrManagerOptionsBase, THandler>

A http message handler factory

Returns

IApizrManagerOptionsBuilder

Type Parameters

THandler

WithHttpMessageHandler<THandler>(THandler)

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

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

Parameters

httpMessageHandler THandler

A http message handler

Returns

IApizrManagerOptionsBuilder

Type Parameters

THandler

WithLoggedHeadersRedactionNames(IEnumerable<string>, ApizrDuplicateStrategy)

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

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

WithLoggedHeadersRedactionRule(Func<string, bool>, ApizrDuplicateStrategy)

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

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

WithLoggerFactory(ILoggerFactory)

Provide a logger factory

public IApizrManagerOptionsBuilder WithLoggerFactory(ILoggerFactory loggerFactory)

Parameters

loggerFactory ILoggerFactory

The logger factory

Returns

IApizrManagerOptionsBuilder

WithLoggerFactory(Func<ILoggerFactory>)

Provide a logger factory

public IApizrManagerOptionsBuilder WithLoggerFactory(Func<ILoggerFactory> loggerFactory)

Parameters

loggerFactory Func<ILoggerFactory>

The logger factory

Returns

IApizrManagerOptionsBuilder

WithLogging(HttpTracerMode, HttpMessageParts, params LogLevel[])

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

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

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

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

public IApizrManagerOptionsBuilder WithLogging(Func<HttpTracerMode> httpTracerModeFactory, Func<HttpMessageParts> trafficVerbosityFactory, Func<LogLevel[]> logLevelsFactory)

Parameters

httpTracerModeFactory Func<HttpTracerMode>

Http traffic tracing mode

trafficVerbosityFactory Func<HttpMessageParts>

Http traffic tracing verbosity factory

logLevelsFactory Func<LogLevel[]>

Log levels factory

Returns

IApizrManagerOptionsBuilder

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

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

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

Parameters

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

Logging configuration factory

Returns

IApizrManagerOptionsBuilder

WithMappingHandler(IMappingHandler)

Provide a mapping handler to map entities

public IApizrManagerOptionsBuilder WithMappingHandler(IMappingHandler mappingHandler)

Parameters

mappingHandler IMappingHandler

An IMappingHandler mapping implementation instance

Returns

IApizrManagerOptionsBuilder

WithMappingHandler(Func<IMappingHandler>)

Provide a mapping handler to map entities

public IApizrManagerOptionsBuilder WithMappingHandler(Func<IMappingHandler> mappingHandlerFactory)

Parameters

mappingHandlerFactory Func<IMappingHandler>

An IMappingHandler mapping implementation instance factory

Returns

IApizrManagerOptionsBuilder

WithOperationTimeout(Func<TimeSpan>)

Set a timeout to the operation (overall request tries)

public IApizrManagerOptionsBuilder WithOperationTimeout(Func<TimeSpan> timeoutFactory)

Parameters

timeoutFactory Func<TimeSpan>

The operation timeout factory

Returns

IApizrManagerOptionsBuilder

WithOperationTimeout(TimeSpan)

Set a timeout to the operation (overall request tries)

public IApizrManagerOptionsBuilder WithOperationTimeout(TimeSpan timeout)

Parameters

timeout TimeSpan

The operation timeout

Returns

IApizrManagerOptionsBuilder

WithRefitSettings(RefitSettings)

Provide some Refit specific settings

public IApizrManagerOptionsBuilder WithRefitSettings(RefitSettings refitSettings)

Parameters

refitSettings RefitSettings

A Refit.RefitSettings instance

Returns

IApizrManagerOptionsBuilder

WithRefitSettings(Func<RefitSettings>)

Provide some Refit specific settings

public IApizrManagerOptionsBuilder WithRefitSettings(Func<RefitSettings> refitSettingsFactory)

Parameters

refitSettingsFactory Func<RefitSettings>

A Refit.RefitSettings instance factory

Returns

IApizrManagerOptionsBuilder

WithRequestOptions(string, Action<IApizrRequestOptionsBuilder>, ApizrDuplicateStrategy)

Configure options for specific requests

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

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

Configure options for specific requests

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

WithRequestTimeout(Func<TimeSpan>)

Set a timeout to the request (each request try)

public IApizrManagerOptionsBuilder WithRequestTimeout(Func<TimeSpan> timeoutFactory)

Parameters

timeoutFactory Func<TimeSpan>

The request timeout factory

Returns

IApizrManagerOptionsBuilder

WithRequestTimeout(TimeSpan)

Set a timeout to the request (each request try)

public IApizrManagerOptionsBuilder WithRequestTimeout(TimeSpan timeout)

Parameters

timeout TimeSpan

The request timeout

Returns

IApizrManagerOptionsBuilder

WithResilienceContextOptions(Action<IApizrResilienceContextOptionsBuilder>)

Set some options to the resilience context

public IApizrManagerOptionsBuilder WithResilienceContextOptions(Action<IApizrResilienceContextOptionsBuilder> contextOptionsBuilder)

Parameters

contextOptionsBuilder Action<IApizrResilienceContextOptionsBuilder>

The resilience context options builder

Returns

IApizrManagerOptionsBuilder

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

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

public IApizrManagerOptionsBuilder 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

IApizrManagerOptionsBuilder

WithResiliencePipelineRegistry(ResiliencePipelineRegistry<string>)

Provide a resilience pipeline registry

public IApizrManagerOptionsBuilder WithResiliencePipelineRegistry(ResiliencePipelineRegistry<string> resiliencePipelineRegistry)

Parameters

resiliencePipelineRegistry ResiliencePipelineRegistry<string>

A resilience pipeline registry instance

Returns

IApizrManagerOptionsBuilder

WithResiliencePipelineRegistry(Func<ResiliencePipelineRegistry<string>>)

Provide a resilience pipeline registry

public IApizrManagerOptionsBuilder WithResiliencePipelineRegistry(Func<ResiliencePipelineRegistry<string>> resiliencePipelineRegistryFactory)

Parameters

resiliencePipelineRegistryFactory Func<ResiliencePipelineRegistry<string>>

A resilience pipeline registry instance factory

Returns

IApizrManagerOptionsBuilder

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

Set some resilience properties to the resilience context

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

Parameters

key ResiliencePropertyKey<TValue>

The resilience property's key

valueFactory Func<TValue>

The resilience property's value factory

Returns

IApizrManagerOptionsBuilder

Type Parameters

TValue

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

Set some resilience properties to the resilience context

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

Parameters

key ResiliencePropertyKey<TValue>

The resilience property's key

value TValue

The resilience property's value

Returns

IApizrManagerOptionsBuilder

Type Parameters

TValue