Constructor SessionProcessRunner
- Namespace
- MVVrus.AspNetCore.ActiveSession.StdRunner
- Assembly
- MVVrus.AspNetCore.ActiveSession.dll
SessionProcessRunner(Func<Action<TResult, int?>, CancellationToken, TResult>, RunnerId, ILogger<SessionProcessRunner<TResult>>?)
[ActiveSessionConstructor(true)]
public SessionProcessRunner(Func<Action<TResult, int?>, CancellationToken, TResult> ProcessTaskBody, RunnerId RunnerId, ILogger<SessionProcessRunner<TResult>>? Logger)
Parameters
ProcessTaskBody
Func<Action<TResult, int?>, CancellationToken, TResult>A delegate that is used as a synchronously executing body of a background task.
RunnerId
RunnerId- The identifier to be assigned to the instance to be created.
Logger
ILogger<SessionProcessRunner<TResult>>- The ILogger instance used to write log messages from the instance to be created.
Exceptions
SessionProcessRunner((Func<Action<TResult, int?>, CancellationToken, TResult> ProcessTaskBody, CancellationTokenSource? Cts, bool PassCtsOwnership), RunnerId, ILogger<SessionProcessRunner<TResult>>?)
[ActiveSessionConstructor(true)]
public SessionProcessRunner((Func<Action<TResult, int?>, CancellationToken, TResult> ProcessTaskBody, CancellationTokenSource? Cts, bool PassCtsOwnership) Param, RunnerId RunnerId, ILogger<SessionProcessRunner<TResult>>? Logger)
Parameters
Param
(Func<Action<TResult, int?>, CancellationToken, TResult> ProcessTaskBody, CancellationTokenSource Cts, bool PassCtsOwnership)A tuple of three values:
-
Func<Action<TResilt, int?>, CancellationToken, TResult> ProcessTaskBody:
A delegate that is used as a synchronously executing body of a background task. -
CancellationTokenSource Cts:
External source for a value of the CompletionToken property. If it is null (default value), a new CancellationTokenSource will be used as the source in the instance to be created. - bool PassCtsOwnership:
This value indicates will the instance to be created be responsible for disposing an external CompletionToken source if it was passed byCompletionTokenSource
.
-
Func<Action<TResilt, int?>, CancellationToken, TResult> ProcessTaskBody:
RunnerId
RunnerId- The identifier to be assigned to the instance to be created.
Logger
ILogger<SessionProcessRunner<TResult>>- The ILogger instance used to write log messages from the instance to be created.
Exceptions
SessionProcessRunner(Action<Action<TResult, int?>, CancellationToken>, RunnerId, ILogger<SessionProcessRunner<TResult>>?)
[ActiveSessionConstructor(true)]
public SessionProcessRunner(Action<Action<TResult, int?>, CancellationToken> ProcessTaskBody, RunnerId RunnerId, ILogger<SessionProcessRunner<TResult>>? Logger)
Parameters
ProcessTaskBody
Action<Action<TResult, int?>, CancellationToken>- A delegate that is used as a synchronously executing body of a background task.
RunnerId
RunnerId- The identifier to be assigned to the instance to be created.
Logger
ILogger<SessionProcessRunner<TResult>>- The ILogger instance used to write log messages from the instance to be created.
SessionProcessRunner((Action<Action<TResult, int?>, CancellationToken> ProcessTaskBody, CancellationTokenSource? Cts, bool PassCtsOwnership), RunnerId, ILogger<SessionProcessRunner<TResult>>?)
[ActiveSessionConstructor(true)]
public SessionProcessRunner((Action<Action<TResult, int?>, CancellationToken> ProcessTaskBody, CancellationTokenSource? Cts, bool PassCtsOwnership) Param, RunnerId RunnerId, ILogger<SessionProcessRunner<TResult>>? Logger)
Parameters
Param
(Action<Action<TResult, int?>, CancellationToken> ProcessTaskBody, CancellationTokenSource Cts, bool PassCtsOwnership)A tuple of three values:
-
Action<Action<TResilt, Int32?>, CancellationToken> ProcessTaskBody:
A delegate that is used as a synchronously executing body of a background task. - CancellationTokenSource Cts:
External source for a value of the CompletionToken property. If it is null (default value), a new CancellationTokenSource will be used as the source in the instance to be created. - bool PassCtsOwnership:
This value indicates will the instance to be created be responsible for disposing an external CompletionToken source if it was passed byCompletionTokenSource
.
-
Action<Action<TResilt, Int32?>, CancellationToken> ProcessTaskBody:
RunnerId
RunnerId- The identifier to be assigned to the instance to be created.
Logger
ILogger<SessionProcessRunner<TResult>>- The ILogger instance used to write log messages from the instance to be created.
Exceptions
SessionProcessRunner(Func<Action<TResult, int?>, CancellationToken, Task<TResult>>, RunnerId, ILogger<SessionProcessRunner<TResult>>?)
[ActiveSessionConstructor(true)]
public SessionProcessRunner(Func<Action<TResult, int?>, CancellationToken, Task<TResult>> ProcessTaskCreator, RunnerId RunnerId, ILogger<SessionProcessRunner<TResult>>? Logger)
Parameters
ProcessTaskCreator
Func<Action<TResult, int?>, CancellationToken, Task<TResult>>- A delegate that is used to create a background task.
RunnerId
RunnerId- The identifier to be assigned to the instance to be created.
Logger
ILogger<SessionProcessRunner<TResult>>- The ILogger instance used to write log messages from the instance to be created.
Exceptions
SessionProcessRunner(Func<Action<TResult, int?>, CancellationToken, Task>, RunnerId, ILogger<SessionProcessRunner<TResult>>?)
[ActiveSessionConstructor(true)]
public SessionProcessRunner(Func<Action<TResult, int?>, CancellationToken, Task> ProcessTaskCreator, RunnerId RunnerId, ILogger<SessionProcessRunner<TResult>>? Logger)
Parameters
ProcessTaskCreator
Func<Action<TResult, int?>, CancellationToken, Task>- A delegate that is used to create a background task.
RunnerId
RunnerId- The identifier to be assigned to the instance to be created.
Logger
ILogger<SessionProcessRunner<TResult>>- The ILogger instance used to write log messages from the instance to be created.
Exceptions
SessionProcessRunner((Func<Action<TResult, int?>, CancellationToken, Task<TResult>> ProcessTaskCreator, CancellationTokenSource? Cts, bool PassCtsOwnership), RunnerId, ILogger<SessionProcessRunner<TResult>>?)
[ActiveSessionConstructor(true)]
public SessionProcessRunner((Func<Action<TResult, int?>, CancellationToken, Task<TResult>> ProcessTaskCreator, CancellationTokenSource? Cts, bool PassCtsOwnership) Param, RunnerId RunnerId, ILogger<SessionProcessRunner<TResult>>? Logger)
Parameters
Param
(Func<Action<TResult, int?>, CancellationToken, Task<TResult>> ProcessTaskCreator, CancellationTokenSource Cts, bool PassCtsOwnership)A tuple of three values:
-
Func<Action<TResilt, Int32?>, CancellationToken, Task<TResult>> ProcessTaskCreator:
A delegate that is used to create a background task. - CancellationTokenSource Cts:
External source for a value of the CompletionToken property. If it is null (default value), a new CancellationTokenSource will be used as the source in the instance to be created. - bool PassCtsOwnership:
This value indicates will the instance to be created be responsible for disposing an external CompletionToken source if it was passed byCompletionTokenSource
.
-
Func<Action<TResilt, Int32?>, CancellationToken, Task<TResult>> ProcessTaskCreator:
RunnerId
RunnerId- The identifier to be assigned to the instance to be created.
Logger
ILogger<SessionProcessRunner<TResult>>- The ILogger instance used to write log messages from the instance to be created.
Exceptions
SessionProcessRunner((Func<Action<TResult, int?>, CancellationToken, Task> ProcessTaskCreator, CancellationTokenSource? Cts, bool PassCtsOwnership), RunnerId, ILogger<SessionProcessRunner<TResult>>?)
[ActiveSessionConstructor(true)]
public SessionProcessRunner((Func<Action<TResult, int?>, CancellationToken, Task> ProcessTaskCreator, CancellationTokenSource? Cts, bool PassCtsOwnership) Param, RunnerId RunnerId, ILogger<SessionProcessRunner<TResult>>? Logger)
Parameters
Param
(Func<Action<TResult, int?>, CancellationToken, Task> ProcessTaskCreator, CancellationTokenSource Cts, bool PassCtsOwnership)A tuple of three values:
-
Func<Action<TResilt, Int32?>, CancellationToken, Task> ProcessTaskCreator:
A delegate that is used to create a background task. - CancellationTokenSource Cts:
External source for a value of the CompletionToken property. If it is null (default value), a new CancellationTokenSource will be used as the source in the instance to be created. - bool PassCtsOwnership:
This value indicates will the instance to be created be responsible for disposing an external CompletionToken source if it was passed byCompletionTokenSource
.
-
Func<Action<TResilt, Int32?>, CancellationToken, Task> ProcessTaskCreator:
RunnerId
RunnerId- The identifier to be assigned to the instance to be created.
Logger
ILogger<SessionProcessRunner<TResult>>- The ILogger instance used to write log messages from the instance to be created.
Exceptions
SessionProcessRunner(Func<Action<TResult, int?>, CancellationToken, Task>, CancellationTokenSource?, bool, RunnerId, ILogger?)
A constructor that performs real work of creating an instance of the runner of this class. This is a protected constructor that is used by all public constructors of this class and may be used by constructors of descendent classes.
protected SessionProcessRunner(Func<Action<TResult, int?>, CancellationToken, Task> ProcessTaskCreator, CancellationTokenSource? CompletionTokenSource, bool PassCtsOwnership, RunnerId RunnerId, ILogger? Logger)
Parameters
ProcessTaskCreator
Func<Action<TResult, int?>, CancellationToken, Task>A delegate that is used to create a background task.
CompletionTokenSource
CancellationTokenSource- External source for a value of the CompletionToken property. If it is null (default value), a new CancellationTokenSource will be used as the source in the instance to be created.
PassCtsOwnership
bool-
This value indicates will the instance to be created be responsible for disposing an external CompletionToken source if it was passed by
CompletionTokenSource
. RunnerId
RunnerId- The identifier to be assigned to the instance to be created.
Logger
ILogger- The ILogger instance used to write log messages from the instance to be created.
Remarks
In some cases the delagate ProcessTaskCreator
really creates a task of type Task<TResult>.