Table of Contents

Method GetRequiredAsync

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

GetRequiredAsync(int, CancellationToken, int, string?)

Asynchronously fetch result from the runner up to the specified point.

ValueTask<RunnerResult<TResult>> GetRequiredAsync(int Advance = 0, CancellationToken Token = default, int StartPosition = -1, string? TraceIdentifier = null)

Parameters

Advance int

Desired maximum increment of the runner's Position, at which the fetch should stop. Interpretaion of the default parameter value DEFAULT_ADVANCE depends on a type of the runner.

Token CancellationToken

A CancellationToken that may be used to cancel the returned ValueTask. Cancellation typically does not affect a background runner execution.

StartPosition int

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.

TraceIdentifier string
String that can be used for tracing.

Returns

ValueTask<RunnerResult<TResult>>
A ValueTask that has a result of type RunnerResult<TResult>. Fields in the structure returned as a result contains values of the properties Status and Position at the point of completion in fields with the same names and a runner-specific result in a Result field,