Method GetAvailableAsync
- Namespace
- MVVrus.AspNetCore.ActiveSession
- Assembly
- MVVrus.AspNetCore.ActiveSession.dll
GetAvailableAsync<TResult>(IRunner<TResult>, int, int, string?, CancellationToken)
public static ValueTask<RunnerResult<TResult>> GetAvailableAsync<TResult>(this IRunner<TResult> Runner, int Advance = 2147483647, int StartPosition = -1, string? TraceIdentifier = null, CancellationToken Token = default)
Parameters
RunnerIRunner<TResult>- An instance of a runner for which the method is called.
Advanceint- Desired increment of the runner's Position, at which the fetch should stop. If the backgound process did not get so far, this method returns the result for the last Position reached. In general, the value of this param should be positive, zero ( DEFAULT_ADVANCE) value having a special meaning.
StartPositionint-
Position value from which a fetch of the result should begin. In general, value of this parameter should be non-negative (except for the special value below) and not less than value of the Position property. Use CURRENT_POSITION constant to continue to fetch result from the last position fetched. TraceIdentifierstring- String that can be used for tracing.
TokenCancellationToken- Can be used for cooperative cancellation of the operation initiated by this method (i.e. cancellation of the result task).
Returns
- ValueTask<RunnerResult<TResult>>
A ValueTask<TResult> wrapping a value returned by GetAvailable(int, int, string?) method call (possibly from a remote host)
Type Parameters
TResultThe type of the result returned by the interface methods of the runner.