Table of Contents

Constructor SessionProcessRunner

Namespace
MVVrus.AspNetCore.ActiveSession.StdRunner
Assembly
MVVrus.AspNetCore.ActiveSession.dll

SessionProcessRunner(Func<Action<TResult, int?>, CancellationToken, TResult>, RunnerId, ILogger<SessionProcessRunner<TResult>>?)

A constructor that creates an instance of the runner by means of TypeRunnerFactory. An external source for CompletionToken property of the runner cannot be used. The runner will run a background task that executes the specified (synchronous) delegate returning the final result from the task.

[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

ArgumentNullException

SessionProcessRunner((Func<Action<TResult, int?>, CancellationToken, TResult> ProcessTaskBody, CancellationTokenSource? Cts, bool PassCtsOwnership), RunnerId, ILogger<SessionProcessRunner<TResult>>?)

A constructor that creates an instance of the runner by means of TypeRunnerFactory. An external source for CompletionToken property of the runner can be used. The runner will run a background task that executes the specified (synchronous) delegate returning the final result from the task.

[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:

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

ArgumentNullException

SessionProcessRunner(Action<Action<TResult, int?>, CancellationToken>, RunnerId, ILogger<SessionProcessRunner<TResult>>?)

A constructor that creates an instance of the runner by means of TypeRunnerFactory. An external source for CompletionToken property of the runner cannot be used. The runner will run a background task that executes the specified (synchronous) delegate without returning the final result from the task.

[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>>?)

A constructor that creates an instance of the runner by means of TypeRunnerFactory. An external source for CompletionToken property of the runner can be used. The runner will run a background task that executes the specified (synchronous) delegate without returning the final result from the task.

[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:

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

ArgumentNullException

SessionProcessRunner(Func<Action<TResult, int?>, CancellationToken, Task<TResult>>, RunnerId, ILogger<SessionProcessRunner<TResult>>?)

A constructor that creates an instance of the runner by means of TypeRunnerFactory. An external source for CompletionToken property of the runner cannot be used. The runner will run a background task created by the specified delegate returning the final result from the task.

[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

ArgumentNullException

SessionProcessRunner(Func<Action<TResult, int?>, CancellationToken, Task>, RunnerId, ILogger<SessionProcessRunner<TResult>>?)

A constructor that creates an instance of the runner by means of TypeRunnerFactory. An external source for CompletionToken property of the runner cannot be used. The runner will run a background task created by the specified delegate without returning the final result from the task.

[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

ArgumentNullException

SessionProcessRunner((Func<Action<TResult, int?>, CancellationToken, Task<TResult>> ProcessTaskCreator, CancellationTokenSource? Cts, bool PassCtsOwnership), RunnerId, ILogger<SessionProcessRunner<TResult>>?)

A constructor that creates an instance of the runner by means of TypeRunnerFactory. An external source for CompletionToken property of the runner can be used. The runner will run a background task created by the specified delegate returning the final result from the task.

[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:

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

ArgumentNullException

SessionProcessRunner((Func<Action<TResult, int?>, CancellationToken, Task> ProcessTaskCreator, CancellationTokenSource? Cts, bool PassCtsOwnership), RunnerId, ILogger<SessionProcessRunner<TResult>>?)

A constructor that creates an instance of the runner by means of TypeRunnerFactory. An external source for CompletionToken property of the runner can be used. The runner will run a background task created by the specified delegate without returning the final result from the task.

[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:

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

ArgumentNullException

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>.