Method CreateSequenceRunner
- Namespace
- MVVrus.AspNetCore.ActiveSession.StdRunner
- Assembly
- MVVrus.AspNetCore.ActiveSession.dll
CreateSequenceRunner<TItem>(IActiveSession, EnumAdapterParams<TItem>, HttpContext, IDisposable?)
Creates an EnumAdapterRunner<TItem> instance in the specified Active Session
public static KeyedRunner<IEnumerable<TItem>> CreateSequenceRunner<TItem>(this IActiveSession Session, EnumAdapterParams<TItem> Source, HttpContext Context, IDisposable? ExclusiveServiceAccessor = null)
Parameters
Session
IActiveSessionAn interface of Active Session object to work with.
Source
EnumAdapterParams<TItem>- A structure that contains a refernce to the source enumerable and additional parameters.
Context
HttpContext- Context of the HTTP request from a handler of which the method is called.
ExclusiveServiceAccessor
IDisposable- The accessor for the exlusively accessible service to be used by the runner. This accessor will be disposed after the runner completion and cleanup thus releasing the lock represented by the accessor on the exclusively accessible scoped service from the active session's container. The accesor value may be null (this is the default value), that means the new runner will not use any exclusively accessible service from the active session's DI container.
Returns
- KeyedRunner<IEnumerable<TItem>>
A structure that contains the reference to the new runner and its number within the active session.
Type Parameters
TItem
Type of items of a sequence (IEnumerable<TItem> interface) that a background process of the runner returns.
CreateSequenceRunner<TItem>(IActiveSession, IEnumerable<TItem>, HttpContext, IDisposable?)
public static KeyedRunner<IEnumerable<TItem>> CreateSequenceRunner<TItem>(this IActiveSession Session, IEnumerable<TItem> Source, HttpContext Context, IDisposable? ExclusiveServiceAccessor = null)
Parameters
Session
IActiveSession- An interface of Active Session object to work with.
Source
IEnumerable<TItem>- An enumerable for which the instance to be created will serve as an adapter.
Context
HttpContext- Context of the HTTP request from a handler of which the method is called.
ExclusiveServiceAccessor
IDisposable- The accessor for the exlusively accessible service to be used by the runner. This accessor will be disposed after the runner completion and cleanup thus releasing the lock represented by the accessor on the exclusively accessible scoped service from the active session's container. The accesor value may be null (this is the default value), that means the new runner will not use any exclusively accessible service from the active session's DI container.
Returns
- KeyedRunner<IEnumerable<TItem>>
A structure that contains the reference to the new runner and its number within the active session.
Type Parameters
TItem
Type of items of a sequence (IEnumerable<TItem> interface) that a background process of the runner returns.
CreateSequenceRunner<TItem>(IActiveSession, AsyncEnumAdapterParams<TItem>, HttpContext, IDisposable?)
Creates an AsyncEnumAdapterRunner<TItem> instance in the specified Active Session.
public static KeyedRunner<IEnumerable<TItem>> CreateSequenceRunner<TItem>(this IActiveSession Session, AsyncEnumAdapterParams<TItem> Source, HttpContext Context, IDisposable? ExclusiveServiceAccessor = null)
Parameters
Session
IActiveSession- An interface of Active Session object to work with.
Source
AsyncEnumAdapterParams<TItem>- A structure that contains a refernce to the source async-enumerable and additional parameters.
Context
HttpContext- Context of the HTTP request from a handler of which the method is called.
ExclusiveServiceAccessor
IDisposable- The accessor for the exlusively accessible service to be used by the runner. This accessor will be disposed after the runner completion and cleanup thus releasing the lock represented by the accessor on the exclusively accessible scoped service from the active session's container. The accesor value may be null (this is the default value), that means the new runner will not use any exclusively accessible service from the active session's DI container.
Returns
- KeyedRunner<IEnumerable<TItem>>
A structure that contains the reference to the new runner and its number within the active session.
Type Parameters
TItem
Type of items of a sequence (IEnumerable<TItem> interface) that a background process of the runner returns.
CreateSequenceRunner<TItem>(IActiveSession, IAsyncEnumerable<TItem>, HttpContext, IDisposable?)
public static KeyedRunner<IEnumerable<TItem>> CreateSequenceRunner<TItem>(this IActiveSession Session, IAsyncEnumerable<TItem> Source, HttpContext Context, IDisposable? ExclusiveServiceAccessor = null)
Parameters
Session
IActiveSession- An interface of Active Session object to work with.
Source
IAsyncEnumerable<TItem>- An async-enumerable for which the instance to be created will serve as an adapter.
Context
HttpContext- Context of the HTTP request from a handler of which the method is called.
ExclusiveServiceAccessor
IDisposable- The accessor for the exlusively accessible service to be used by the runner. This accessor will be disposed after the runner completion and cleanup thus releasing the lock represented by the accessor on the exclusively accessible scoped service from the active session's container. The accesor value may be null (this is the default value), that means the new runner will not use any exclusively accessible service from the active session's DI container.
Returns
- KeyedRunner<IEnumerable<TItem>>
A structure that contains the reference to the new runner and its number within the active session.
Type Parameters
TItem
Type of items of a sequence (IEnumerable<TItem> interface) that a background process of the runner returns.