Method SetStatus
- Namespace
- MVVrus.AspNetCore.ActiveSession
- Assembly
- MVVrus.AspNetCore.ActiveSession.dll
SetStatus(RunnerStatus, bool)
Protected. Sets the Status property enforcing rules for changing this property.
protected bool SetStatus(RunnerStatus Status, bool DoNotComplete = false)
Parameters
Status
RunnerStatusThe new value for the Status property.
DoNotComplete
boolDo not singnal the runner completion (cancel CompletionToken) in this call if it comes to a final status. If this parameter is set, one should call CheckCompletion() method later to signal completion.
Returns
Remarks
The enforced rules rules are the following:
- The Status value of NotStarted cannot be changed. I.e. this method cannot be used to start a background execution of a runner. Use StartRunning(RunnerStatus) or StartRunningAsync(RunnerStatus) instead.
- If the Status value is a final one it will not be changed.
- The Status value cannot be set to NotStarted.