Class DelayOptions
- Namespace
- Temporalio.Workflows
- Assembly
- Temporalio.dll
Options for timers (i.e. DelayAsync).
public class DelayOptions : ICloneable
- Inheritance
-
DelayOptions
- Implements
- Inherited Members
Constructors
DelayOptions()
Initializes a new instance of the DelayOptions class.
public DelayOptions()
DelayOptions(int, string?, CancellationToken?)
Initializes a new instance of the DelayOptions class.
public DelayOptions(int millisecondsDelay, string? summary = null, CancellationToken? cancellationToken = null)
Parameters
millisecondsDelayintSee Delay.
summarystringSee Summary.
cancellationTokenCancellationToken?See CancellationToken.
DelayOptions(TimeSpan, string?, CancellationToken?)
Initializes a new instance of the DelayOptions class.
public DelayOptions(TimeSpan delay, string? summary = null, CancellationToken? cancellationToken = null)
Parameters
delayTimeSpanSee Delay.
summarystringSee Summary.
cancellationTokenCancellationToken?See CancellationToken.
Properties
CancellationToken
Gets or sets the cancellation token for the timer. If unset, this defaults to CancellationToken.
public CancellationToken? CancellationToken { get; set; }
Property Value
Delay
Gets or sets the amount of time to sleep.
public TimeSpan Delay { get; set; }
Property Value
Remarks
The delay value can be Infinite or
InfiniteTimeSpan but otherwise cannot be
negative. A server-side timer is not created for infinite delays, so it is
non-deterministic to change a timer to/from infinite from/to an actual value.
If the delay is 0, it is assumed to be 1 millisecond and still results in a
server-side timer. Since Temporal timers are server-side, timer resolution may not end
up as precise as system timers.
EventGroups
Gets or sets Event Groups to attach to this timer, in addition to those active in the current WithEventGroups(params EventGroup[]) scope.
public IReadOnlyCollection<EventGroup>? EventGroups { get; set; }
Property Value
Remarks
WARNING: Event Groups are experimental.
Summary
Gets or sets a simple string identifying this timer that may be visible in UI/CLI. While it can be normal text, it is best to treat as a timer ID.
public string? Summary { get; set; }
Property Value
Methods
Clone()
Create a shallow copy of these options.
public virtual object Clone()
Returns
- object
A shallow copy of these options.