TaskOrchestrationContext.IsReplaying Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value indicating whether the orchestrator is currently replaying a previous execution.
public abstract bool IsReplaying { get; }
member this.IsReplaying : bool
Public MustOverride ReadOnly Property IsReplaying As Boolean
Property Value
true
if the orchestrator is currently replaying a previous execution; otherwise false
.
Remarks
Orchestrator functions are "replayed" after being unloaded from memory to reconstruct local variable state. During a replay, previously executed tasks will be completed automatically with previously seen values that are stored in the orchestration history. One the orchestrator reaches the point in the orchestrator where it's no longer replaying existing history, the IsReplaying property will return false
.
You can use this property if you have logic that needs to run only when not replaying. For example, certain types of application logging may become too noisy when duplicated as part of replay. The application code could check to see whether the function is being replayed and then issue the log statements when this value is false
.