Method GetRequiredAsync
- Namespace
- MVVrus.AspNetCore.ActiveSession
- Assembly
- MVVrus.AspNetCore.ActiveSession.dll
GetRequiredAsync(int, CancellationToken, int, string?)
public ValueTask<RunnerResult<IEnumerable<TItem>>> GetRequiredAsync(int Advance = 0, CancellationToken Token = default, int StartPosition = -1, string? TraceIdentifier = null)
Parameters
Advance
intMaximum number of items in the sequience returned in result's Result field. The default value of the parameter is substituted by a DefaultAdvance value passed via the constructor.Token
CancellationTokenA CancellationToken that may be used to cancel the returned ValueTask. Cancellation typically does not affect a background runner execution.
StartPosition
intPosition value from which a fetch of the result should begin. Must be equal to the current runner's Position or a constant CURRENT_POSITIONTraceIdentifier
string- String that can be used for tracing.
Returns
- ValueTask<RunnerResult<IEnumerable<TItem>>>
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, the Result field of the returned structure contains sequence of items (of type TItem) already fetched in background, that have not been returned yet by previous GetAvailable and GetRequiredAsync calls . A number of items in the sequence cannot be greater thanAdvance
value, but that number can be less if it is the last part of a sequence produced by a completed background execution.