Method GetRequired
- Namespace
- MVVrus.AspNetCore.ActiveSession
- Assembly
- MVVrus.AspNetCore.ActiveSession.dll
GetRequired<TResult>(IRunner<TResult>, int, int, string?)
A synchronous counterpart of IRunner<TResult>.GetRequiredAsync method.
public static RunnerResult<TResult> GetRequired<TResult>(this IRunner<TResult> Runner, int Advance = 0, int StartPosition = -1, string? TraceIdentifier = null)
Parameters
Runner
IRunner<TResult>An instance of a runner for wich the method is called
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.
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
- 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,
Type Parameters
TResult
The type of the result returned by the interface methods of the runner.