Interface IApizrExtendedSharedOptionsBuilder<TApizrExtendedSharedOptions, TApizrExtendedSharedOptionsBuilder>
- Namespace
- Apizr.Extending.Configuring.Shared
- Assembly
- Apizr.Extensions.Microsoft.DependencyInjection.dll
Builder options available at both common and proper level for extended registrations
public interface IApizrExtendedSharedOptionsBuilder<out TApizrExtendedSharedOptions, out TApizrExtendedSharedOptionsBuilder> : IApizrExtendedSharedRegistrationOptionsBuilderBase, IApizrGlobalSharedRegistrationOptionsBuilderBase<TApizrExtendedSharedOptions, TApizrExtendedSharedOptionsBuilder>, IApizrGlobalSharedOptionsBuilderBase<TApizrExtendedSharedOptions, TApizrExtendedSharedOptionsBuilder>, IApizrGlobalSharedRegistrationOptionsBuilderBase, IApizrGlobalSharedOptionsBuilderBase where TApizrExtendedSharedOptions : IApizrSharedRegistrationOptionsBase where TApizrExtendedSharedOptionsBuilder : IApizrGlobalSharedRegistrationOptionsBuilderBase<out TApizrExtendedSharedOptions, out TApizrExtendedSharedOptionsBuilder>
Type Parameters
TApizrExtendedSharedOptions
TApizrExtendedSharedOptionsBuilder
- Inherited Members
Methods
ConfigureHttpClientBuilder(Action<IHttpClientBuilder>, ApizrDuplicateStrategy)
Adjust some HttpClient settings
TApizrExtendedSharedOptionsBuilder ConfigureHttpClientBuilder(Action<IHttpClientBuilder> httpClientBuilder, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Merge)
Parameters
httpClientBuilder
Action<IHttpClientBuilder>The HttpClient builder
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's another one already (default: Merge)
Returns
- TApizrExtendedSharedOptionsBuilder
WithAuthenticationHandler(Type)
Provide your own AuthenticationHandlerBase generic implementation
TApizrExtendedSharedOptionsBuilder WithAuthenticationHandler(Type authenticationHandlerType)
Parameters
authenticationHandlerType
TypeYour own AuthenticationHandlerBase generic implementation
Returns
- TApizrExtendedSharedOptionsBuilder
WithAuthenticationHandler<TAuthenticationHandler>(Func<IServiceProvider, IApizrManagerOptionsBase, TAuthenticationHandler>)
Provide your own AuthenticationHandlerBase implementation
TApizrExtendedSharedOptionsBuilder WithAuthenticationHandler<TAuthenticationHandler>(Func<IServiceProvider, IApizrManagerOptionsBase, TAuthenticationHandler> authenticationHandlerFactory) where TAuthenticationHandler : AuthenticationHandlerBase
Parameters
authenticationHandlerFactory
Func<IServiceProvider, IApizrManagerOptionsBase, TAuthenticationHandler>A
TAuthenticationHandler
instance factory
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
TAuthenticationHandler
Your AuthenticationHandlerBase implementation
WithAuthenticationHandler<TTokenService>(Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>>)
Provide your own token management services
TApizrExtendedSharedOptionsBuilder 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
- TApizrExtendedSharedOptionsBuilder
Type Parameters
TTokenService
Your token management service (refreshing token)
WithAuthenticationHandler<TSettingsService>(Expression<Func<TSettingsService, HttpRequestMessage, CancellationToken, Task<string>>>)
Provide your own settings management service
TApizrExtendedSharedOptionsBuilder 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
- TApizrExtendedSharedOptionsBuilder
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
TApizrExtendedSharedOptionsBuilder 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
- TApizrExtendedSharedOptionsBuilder
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
TApizrExtendedSharedOptionsBuilder 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
- TApizrExtendedSharedOptionsBuilder
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
TApizrExtendedSharedOptionsBuilder WithAuthenticationHandler<TSettingsService>(Expression<Func<TSettingsService, string>> tokenPropertyExpression)
Parameters
tokenPropertyExpression
Expression<Func<TSettingsService, string>>The token property to get from and set to
Returns
- TApizrExtendedSharedOptionsBuilder
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
TApizrExtendedSharedOptionsBuilder WithAuthenticationHandler<TAuthService>(Expression<Func<TAuthService, string>> tokenPropertyExpression, Expression<Func<TAuthService, HttpRequestMessage, string, CancellationToken, Task<string>>> refreshTokenMethod)
Parameters
tokenPropertyExpression
Expression<Func<TAuthService, string>>The token property to get from and set to
refreshTokenMethod
Expression<Func<TAuthService, HttpRequestMessage, string, CancellationToken, Task<string>>>The method called to refresh the token
Returns
- TApizrExtendedSharedOptionsBuilder
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
TApizrExtendedSharedOptionsBuilder 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
- TApizrExtendedSharedOptionsBuilder
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
TApizrExtendedSharedOptionsBuilder WithAuthenticationHandler<TSettingsService, TTokenService>(Expression<Func<TSettingsService, string>> tokenPropertyExpression, Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>> refreshTokenMethod)
Parameters
tokenPropertyExpression
Expression<Func<TSettingsService, string>>The token property to get from and set to
refreshTokenMethod
Expression<Func<TTokenService, HttpRequestMessage, string, CancellationToken, Task<string>>>The method called to refresh the token
Returns
- TApizrExtendedSharedOptionsBuilder
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)
TApizrExtendedSharedOptionsBuilder WithBaseAddress(Func<IServiceProvider, string> baseAddressFactory, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)
Parameters
baseAddressFactory
Func<IServiceProvider, string>Your web api base address factory
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's any other already (default: Replace)
Returns
- TApizrExtendedSharedOptionsBuilder
WithBaseAddress(Func<IServiceProvider, Uri>, ApizrDuplicateStrategy)
Define your web api base address (could be defined with WebApiAttribute)
TApizrExtendedSharedOptionsBuilder WithBaseAddress(Func<IServiceProvider, Uri> baseAddressFactory, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)
Parameters
baseAddressFactory
Func<IServiceProvider, Uri>Your web api base address factory
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's any other already (default: Replace)
Returns
- TApizrExtendedSharedOptionsBuilder
WithBasePath(Func<IServiceProvider, string>, ApizrDuplicateStrategy)
Define your web api base path (could be defined with WebApiAttribute)
TApizrExtendedSharedOptionsBuilder WithBasePath(Func<IServiceProvider, string> basePathFactory, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace)
Parameters
basePathFactory
Func<IServiceProvider, string>Your web api base path factory
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's any other already (default: Replace)
Returns
- TApizrExtendedSharedOptionsBuilder
WithDelegatingHandler<THandler>(ApizrDuplicateStrategy)
Add a custom delegating handler inheriting from DelegatingHandler (serial call)
TApizrExtendedSharedOptionsBuilder WithDelegatingHandler<THandler>(ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Add) where THandler : DelegatingHandler
Parameters
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's any other already (default: Add)
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
THandler
WithDelegatingHandler<THandler>(Func<IServiceProvider, IApizrManagerOptionsBase, THandler>, ApizrDuplicateStrategy)
Add a custom delegating handler inheriting from DelegatingHandler (serial call)
TApizrExtendedSharedOptionsBuilder 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
ApizrDuplicateStrategyThe duplicate strategy if there's any other already (default: Add)
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
THandler
WithDelegatingHandler<THandler>(Func<IServiceProvider, THandler>, ApizrDuplicateStrategy)
Add a custom delegating handler inheriting from DelegatingHandler (serial call)
TApizrExtendedSharedOptionsBuilder WithDelegatingHandler<THandler>(Func<IServiceProvider, THandler> delegatingHandlerFactory, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Add) where THandler : DelegatingHandler
Parameters
delegatingHandlerFactory
Func<IServiceProvider, THandler>A delegating handler factory
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's any other already (default: Add)
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
THandler
WithExCatching(Func<IServiceProvider, ApizrException, bool>, bool, ApizrDuplicateStrategy)
Catch potential exceptions
TApizrExtendedSharedOptionsBuilder 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
boolLet throw potential exception even if it's handled (default: true)
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's another callback already (default: Replace)
Returns
- TApizrExtendedSharedOptionsBuilder
WithExCatching(Func<IServiceProvider, ApizrException, Task<bool>>, bool, ApizrDuplicateStrategy)
Catch potential exceptions
TApizrExtendedSharedOptionsBuilder 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
boolLet throw potential exception even if it's handled (default: true)
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's another callback already (default: Replace)
Returns
- TApizrExtendedSharedOptionsBuilder
WithExCatching<THandler>(bool, ApizrDuplicateStrategy)
Catch potential exceptions
TApizrExtendedSharedOptionsBuilder WithExCatching<THandler>(bool letThrowOnHandledException = true, ApizrDuplicateStrategy strategy = ApizrDuplicateStrategy.Replace) where THandler : IApizrExceptionHandler
Parameters
letThrowOnHandledException
boolLet throw potential exception even if it's handled (default: true)
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's another callback already (default: Replace)
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
THandler
WithExCatching<TResult>(Func<IServiceProvider, ApizrException<TResult>, bool>, bool, ApizrDuplicateStrategy)
Catch potential exceptions
TApizrExtendedSharedOptionsBuilder 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
boolLet throw potential exception even if it's handled (default: true)
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's another callback already (default: Replace)
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
TResult
WithExCatching<TResult>(Func<IServiceProvider, ApizrException<TResult>, Task<bool>>, bool, ApizrDuplicateStrategy)
Catch potential exceptions
TApizrExtendedSharedOptionsBuilder 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
boolLet throw potential exception even if it's handled (default: true)
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's another callback already (default: Replace)
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
TResult
WithExCatching<THandler>(Func<IServiceProvider, THandler>, bool, ApizrDuplicateStrategy)
Catch potential exceptions
TApizrExtendedSharedOptionsBuilder 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
boolLet throw potential exception even if it's handled (default: true)
strategy
ApizrDuplicateStrategyThe duplicate strategy if there's another callback already (default: Replace)
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
THandler
WithHeaders(Func<IServiceProvider, IList<string>>, ApizrDuplicateStrategy, ApizrLifetimeScope, ApizrRegistrationMode)
Add some headers to the request
TApizrExtendedSharedOptionsBuilder 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
ApizrDuplicateStrategyThe duplicate strategy if there's another one already (default: Add)
scope
ApizrLifetimeScopeTells Apizr if you want to refresh or not headers values at request time (default: Api = no refresh)
mode
ApizrRegistrationModeSet headers right the way or store it for further attribute key match use (default: Set)
Returns
- TApizrExtendedSharedOptionsBuilder
WithHeaders<TSettingsService>(Expression<Func<TSettingsService, string>>[], ApizrDuplicateStrategy, ApizrLifetimeScope, ApizrRegistrationMode)
Add some headers to the request loaded from service properties
TApizrExtendedSharedOptionsBuilder 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
ApizrDuplicateStrategyThe duplicate strategy if there's another one already (default: Add)
scope
ApizrLifetimeScopeTells Apizr if you want to refresh or not headers values at request time (default: Api = no refresh)
mode
ApizrRegistrationModeSet headers right the way or store it for further attribute key match use (default: Set)
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
TSettingsService
Your settings management service (getting headers)
WithHttpClientHandler(Func<IServiceProvider, HttpClientHandler>)
Provide a custom HttpClientHandler
TApizrExtendedSharedOptionsBuilder WithHttpClientHandler(Func<IServiceProvider, HttpClientHandler> httpClientHandlerFactory)
Parameters
httpClientHandlerFactory
Func<IServiceProvider, HttpClientHandler>An HttpClientHandler instance factory
Returns
- TApizrExtendedSharedOptionsBuilder
WithHttpMessageHandler<THandler>()
Add a custom http message handler inheriting from HttpMessageHandler (last call)
TApizrExtendedSharedOptionsBuilder WithHttpMessageHandler<THandler>() where THandler : HttpMessageHandler
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
THandler
WithHttpMessageHandler<THandler>(Func<IServiceProvider, IApizrManagerOptionsBase, THandler>)
Add a custom http message handler inheriting from HttpMessageHandler (last call)
TApizrExtendedSharedOptionsBuilder WithHttpMessageHandler<THandler>(Func<IServiceProvider, IApizrManagerOptionsBase, THandler> httpMessageHandlerFactory) where THandler : HttpMessageHandler
Parameters
httpMessageHandlerFactory
Func<IServiceProvider, IApizrManagerOptionsBase, THandler>A http message handler factory
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
THandler
WithHttpMessageHandler<THandler>(Func<IServiceProvider, THandler>)
Add a custom http message handler inheriting from HttpMessageHandler (last call)
TApizrExtendedSharedOptionsBuilder WithHttpMessageHandler<THandler>(Func<IServiceProvider, THandler> httpMessageHandlerFactory) where THandler : HttpMessageHandler
Parameters
httpMessageHandlerFactory
Func<IServiceProvider, THandler>A http message handler factory
Returns
- TApizrExtendedSharedOptionsBuilder
Type Parameters
THandler
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)
TApizrExtendedSharedOptionsBuilder WithLogging(Func<IServiceProvider, HttpTracerMode> httpTracerModeFactory, Func<IServiceProvider, HttpMessageParts> trafficVerbosityFactory, Func<IServiceProvider, LogLevel[]> logLevelsFactory)
Parameters
httpTracerModeFactory
Func<IServiceProvider, HttpTracerMode>Http traffic tracing mode factory
trafficVerbosityFactory
Func<IServiceProvider, HttpMessageParts>Http traffic tracing verbosity factory
logLevelsFactory
Func<IServiceProvider, LogLevel[]>Log levels factory
Returns
- TApizrExtendedSharedOptionsBuilder
WithLogging(Func<IServiceProvider, (HttpTracerMode, HttpMessageParts, LogLevel[])>)
Define tracer mode, http traffic tracing verbosity and log levels (could be defined with LogAttribute)
TApizrExtendedSharedOptionsBuilder WithLogging(Func<IServiceProvider, (HttpTracerMode, HttpMessageParts, LogLevel[])> loggingConfigurationFactory)
Parameters
loggingConfigurationFactory
Func<IServiceProvider, (HttpTracerMode, HttpMessageParts, LogLevel[])>Logging configuration factory
Returns
- TApizrExtendedSharedOptionsBuilder
WithOperationTimeout(Func<IServiceProvider, TimeSpan>)
Set a timeout to the operation (overall request tries)
TApizrExtendedSharedOptionsBuilder WithOperationTimeout(Func<IServiceProvider, TimeSpan> timeoutFactory)
Parameters
timeoutFactory
Func<IServiceProvider, TimeSpan>The operation timeout factory
Returns
- TApizrExtendedSharedOptionsBuilder
WithRequestTimeout(Func<IServiceProvider, TimeSpan>)
Set a timeout to the request (each request try)
TApizrExtendedSharedOptionsBuilder WithRequestTimeout(Func<IServiceProvider, TimeSpan> timeoutFactory)
Parameters
timeoutFactory
Func<IServiceProvider, TimeSpan>The request timeout factory
Returns
- TApizrExtendedSharedOptionsBuilder
WithResilienceProperty<TValue>(ResiliencePropertyKey<TValue>, Func<IServiceProvider, TValue>)
Set some resilience properties to the resilience context
TApizrExtendedSharedOptionsBuilder 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
- TApizrExtendedSharedOptionsBuilder
Type Parameters
TValue