Method AddAsyncEnumAdapter
- Namespace
- MVVrus.AspNetCore.ActiveSession.StdRunner
- Assembly
- MVVrus.AspNetCore.ActiveSession.dll
AddAsyncEnumAdapter<TItem>(IServiceCollection)
Adds a runner factory to the application's DI container for AsyncEnumAdapterRunner<TItem>.
public static IServiceCollection AddAsyncEnumAdapter<TItem>(this IServiceCollection Services)
Parameters
Services
IServiceCollectionIServiceCollection implementation to be used to configure an application service container
Returns
- IServiceCollection
Value of the Services param, this value is used to facilitate call chaining.
Type Parameters
TItem
Type of objects in a sequence (IEnumerable<TItem>) for which the adapter to be created.
Remarks
The factory created will be used for creation of a runner via following extension methods:
CreateSequenceRunner<TItem>(IActiveSession, IAsyncEnumerable<TItem>, HttpContext, IDisposable?) or CreateSequenceRunner<TItem>(IActiveSession, AsyncEnumAdapterParams<TItem>, HttpContext, IDisposable?)
AddAsyncEnumAdapter<TItem>(IServiceCollection, Action<ActiveSessionOptions>?)
Adds a runner factory to the application's DI container for AsyncEnumAdapterRunner<TItem>.
public static IServiceCollection AddAsyncEnumAdapter<TItem>(this IServiceCollection Services, Action<ActiveSessionOptions>? Configurator)
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 library features. May be null, if no additional configuraion to be performed
Returns
- IServiceCollection
Value of the Services param, this value is used to facilitate call chaining.
Type Parameters
TItem
Type of objects in a sequence (IEnumerable<TItem>) for which the adapter to be created.
Remarks
The factory created will be used for creation of a runner via following extension methods:
CreateSequenceRunner<TItem>(IActiveSession, IAsyncEnumerable<TItem>, HttpContext, IDisposable?) or CreateSequenceRunner<TItem>(IActiveSession, AsyncEnumAdapterParams<TItem>, HttpContext, IDisposable?)