Class Workflow.Unsafe
- Namespace
- Temporalio.Workflows
- Assembly
- Temporalio.dll
Unsafe calls that can be made in a workflow.
public static class Workflow.Unsafe
- Inheritance
-
Workflow.Unsafe
- Inherited Members
Properties
IsReplaying
Gets a value indicating whether this workflow is replaying.
public static bool IsReplaying { get; }
Property Value
Remarks
This should not be used for most cases. It is only valuable for advanced cases like preventing a log or metric from being recorded on replay.
Methods
WithTracingEventListenerDisabled(Action)
Disables the event listener that catches invalid calls and thread operations in workflows. This is the equivalent of DisableWorkflowTracingEventListener but for a short bit of code.
public static void WithTracingEventListenerDisabled(Action fn)
Parameters
fn
ActionFunction to run.
Remarks
Note, this disablement is set across the workflow instance. This means any other concurrent task will also have the tracing event listener disabled while this code is running. For this reason, the function passed should not yield/block on the workflow's task scheduler and if any workflow commands are created within the passed function, an exception is thrown. On complete, the disablement is set to what it was before this call, so while nested disablement may work as expected, concurrent disablement may not.
- See Also
WithTracingEventListenerDisabled<T>(Func<T>)
Disables the event listener that catches invalid calls and thread operations in workflows. This is the equivalent of DisableWorkflowTracingEventListener but for a short bit of code.
public static T WithTracingEventListenerDisabled<T>(Func<T> fn)
Parameters
fn
Func<T>Function to run.
Returns
- T
Result of the function.
Type Parameters
T
Return type parameter.
Remarks
Note, this disablement is set across the workflow instance. This means any other concurrent task will also have the tracing event listener disabled while this code is running. For this reason, the function passed should not yield/block on the workflow's task scheduler and if any workflow commands are created within the passed function, an exception is thrown. On complete, the disablement is set to what it was before this call, so while nested disablement may work as expected, concurrent disablement may not.
- See Also