Method AddActiveSessions
- Namespace
- MVVrus.AspNetCore.ActiveSession
- Assembly
- MVVrus.AspNetCore.ActiveSession.dll
AddActiveSessions<TRequest, TResult>(IServiceCollection, Func<TRequest, IRunner<TResult>>)
Extension method to configure use of an factory-based variant of runner factory service.
public static IServiceCollection AddActiveSessions<TRequest, TResult>(this IServiceCollection Services, Func<TRequest, IRunner<TResult>> Factory)
Parameters
Services
IServiceCollectionIServiceCollection implementation to be used to configure an application service container
Factory
Func<TRequest, IRunner<TResult>>The factory delegate to be used by the runner factory service.
Returns
- IServiceCollection
Value of the Services param, used to facilitate call chaining
Type Parameters
TRequest
Type of the input parameter of factory delegate.
TResult
Type used to specialize a IRunner generic interface, returned by the factory delegate.
AddActiveSessions<TRequest, TResult>(IServiceCollection, Func<TRequest, IRunner<TResult>>, Action<ActiveSessionOptions>?)
Extension method to configure use of an factory-based variant of runner factory service
public static IServiceCollection AddActiveSessions<TRequest, TResult>(this IServiceCollection Services, Func<TRequest, IRunner<TResult>> Factory, Action<ActiveSessionOptions>? Configurator)
Parameters
Services
IServiceCollectionIServiceCollection implementation to be used to configure an application service container
Factory
Func<TRequest, IRunner<TResult>>The factory delegate to be used by the runner factory service.
Configurator
Action<ActiveSessionOptions>The delegate used to configure additional options (of type ActiveSessionOptions) for the ActiveSession feature May be null, if no additional configuraion to be performed
Returns
- IServiceCollection
Value of the Services param, used to facilitate call chaining
Type Parameters
TRequest
Type of the input parameter of factory delegate.
TResult
Type used to specialize a IRunner generic interface, returned by the factory delegate.
AddActiveSessions<TRequest, TResult>(IServiceCollection, Func<TRequest, IServiceProvider, IRunner<TResult>>)
Extension method to configure use of an factory-based variant of runner factory service
public static IServiceCollection AddActiveSessions<TRequest, TResult>(this IServiceCollection Services, Func<TRequest, IServiceProvider, IRunner<TResult>> Factory)
Parameters
Services
IServiceCollectionIServiceCollection implementation to be used to configure an application service container
Factory
Func<TRequest, IServiceProvider, IRunner<TResult>>The factory delegate to be used by the runner factory service.
Returns
- IServiceCollection
Value of the Services param, used to facilitate call chaining
Type Parameters
TRequest
Type of the input parameter of factory delegate.
TResult
Type used to specialize a IRunner generic interface, returned by the factory delegate.
AddActiveSessions<TRequest, TResult>(IServiceCollection, Func<TRequest, IServiceProvider, IRunner<TResult>>, Action<ActiveSessionOptions>?)
Extension method to configure use of an factory-based variant of runner factory service
public static IServiceCollection AddActiveSessions<TRequest, TResult>(this IServiceCollection Services, Func<TRequest, IServiceProvider, IRunner<TResult>> Factory, Action<ActiveSessionOptions>? Configurator)
Parameters
Services
IServiceCollectionIServiceCollection implementation to be used to configure an application service container
Factory
Func<TRequest, IServiceProvider, IRunner<TResult>>The factory delegate to be used by the runner factory service.
Configurator
Action<ActiveSessionOptions>The delegate used to configure additional options (of type ActiveSessionOptions) for the ActiveSession feature May be null, if no additional configuraion to be performed
Returns
- IServiceCollection
Value of the Services param, used to facilitate call chaining
Type Parameters
TRequest
Type of the input parameter of factory delegate.
TResult
Type used to specialize a IRunner generic interface, returned by the factory delegate.
Remarks
A runner factory service is a specialization of the generic runner factory interface .
In this overload the factory delegate does use service container but not set value for runner Id property and a configuration delegate for changing ActiveSessionOptions is used
AddActiveSessions<TRequest, TResult>(IServiceCollection, Func<TRequest, IServiceProvider, RunnerId, IRunner<TResult>>)
Extension method to configure use of an factory-based variant of runner factory service
public static IServiceCollection AddActiveSessions<TRequest, TResult>(this IServiceCollection Services, Func<TRequest, IServiceProvider, RunnerId, IRunner<TResult>> Factory)
Parameters
Services
IServiceCollectionIServiceCollection implementation to be used to configure an application service container
Factory
Func<TRequest, IServiceProvider, RunnerId, IRunner<TResult>>The factory delegate to be used by the runner factory service.
Returns
- IServiceCollection
Value of the Services param, used to facilitate call chaining
Type Parameters
TRequest
Type of the input parameter of factory delegate.
TResult
Type used to specialize a IRunner generic interface, returned by the factory delegate.
AddActiveSessions<TRequest, TResult>(IServiceCollection, Func<TRequest, IServiceProvider, RunnerId, IRunner<TResult>>, Action<ActiveSessionOptions>?)
Extension method to configure use of an factory-based variant of runner factory service
public static IServiceCollection AddActiveSessions<TRequest, TResult>(this IServiceCollection Services, Func<TRequest, IServiceProvider, RunnerId, IRunner<TResult>> Factory, Action<ActiveSessionOptions>? Configurator)
Parameters
Services
IServiceCollectionIServiceCollection implementation to be used to configure an application service container
Factory
Func<TRequest, IServiceProvider, RunnerId, IRunner<TResult>>The factory delegate to be used by the runner factory service.
Configurator
Action<ActiveSessionOptions>The delegate used to configure additional options (of type ActiveSessionOptions) for the ActiveSession feature May be null, if no additional configuraion to be performed
Returns
- IServiceCollection
Value of the Services param, used to facilitate call chaining
Type Parameters
TRequest
Type of the input parameter of factory delegate.
TResult
Type used to specialize a IRunner generic interface, returned by the factory delegate.
Remarks
A runner factory service is a specialization of the generic runner factory interface .
In this overload the factory delegate does use service container and set value for runner Id property and a configuration delegate for changing ActiveSessionOptions is used
AddActiveSessions<TRunner>(IServiceCollection, params object[])
Extension method used to configure a type-based variant of runner factory services
public static IServiceCollection AddActiveSessions<TRunner>(this IServiceCollection Services, params object[] ExtraArguments)
Parameters
Services
IServiceCollectionIServiceCollection implementation to be used to configure an application service container
ExtraArguments
object[]Additional arguments to pass into TRunner constructor
Returns
- IServiceCollection
Value of the Services param, used to facilitate call chaining
Type Parameters
TRunner
Class used as implementation of a runner implementing one or more specializations of IRunner generic interface
Remarks
Runner factory service is a specializations of the generic runner factory interface .
Specializations of IRunnerFactory<TRequest, TResult>
for all combinations of TRequest and TResult supported by the TRunner type are added
In this overload a configuration delegate for changing ActiveSessionOptions is not used
Exceptions
AddActiveSessions<TRunner>(IServiceCollection, Action<ActiveSessionOptions>?, params object[])
Extension method used to configure a type-based variant of runner factory services
(specializations of the generic runner factory interface .)
Specializations of IRunnerFactory<TRequest, TResult>
for all combinations of TRequest and TResult supported by the TRunner type are added
public static IServiceCollection AddActiveSessions<TRunner>(this IServiceCollection Services, Action<ActiveSessionOptions>? Configurator, params object[] ExtraArguments)
Parameters
Services
IServiceCollectionIServiceCollection implementation to be used to configure an application service container
Configurator
Action<ActiveSessionOptions>The delegate used to configure additional options (of type ActiveSessionOptions) for the ActiveSession feature May be null, if no additional configuraion to be performed
ExtraArguments
object[]Additional arguments to pass into TRunner constructor
Returns
- IServiceCollection
Value of the Services param, used to facilitate call chaining
Type Parameters
TRunner
Class used as implementation of a runner implementing one or more specializations of IRunner generic interface
Remarks
Runner factory service is a specializations of the generic runner factory interface .
Specializations of IRunnerFactory<TRequest, TResult>
for all combinations of TRequest and TResult supported by the TRunner type are added
In this overload a configuration delegate for changing ActiveSessionOptions is used