Method GetAvailable
- Namespace
- MVVrus.AspNetCore.ActiveSession.StdRunner
- Assembly
- MVVrus.AspNetCore.ActiveSession.dll
GetAvailable(int, int, string?)
public RunnerResult<TResult> GetAvailable(int Advance = 2147483647, int StartPosition = -1, string? TraceIdentifier = null)
Parameters
Advance
intDesired 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.
StartPosition
intPosition 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>
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 field Result type being TResult).
Remarks
If Advance
has zero (i.e. DEFAULT_ADVANCE) value
and StartPosition
has (explicitly or implicitly, using CURRENT_POSITION) the same value
as the current Position property then value of the Advance is assumed to be 1.
This method always returns a result (value of Result field in the RunnerResult structure) obtained from the last callback from the background process (or its returned result if the background process has been ended and returns a result). So when the method is called for the earlier resulting position than achieved by the background process it does return not an intermediate result for that position but the last result for the current position achieved by background.