Class WorkflowSignalAttribute
- Namespace
- Temporalio.Workflows
- Assembly
- Temporalio.dll
Designate a method as a signal handler.
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class WorkflowSignalAttribute : Attribute
- Inheritance
-
WorkflowSignalAttribute
- Inherited Members
Remarks
This is not inherited, so if a method is overridden, it must also have this attribute. The method must be a public non-static and return a task (not a task with a type embedded).
Constructors
WorkflowSignalAttribute()
Initializes a new instance of the WorkflowSignalAttribute class with the default name. See Name.
public WorkflowSignalAttribute()
WorkflowSignalAttribute(string)
Initializes a new instance of the WorkflowSignalAttribute class with the given name.
public WorkflowSignalAttribute(string name)
Parameters
Properties
Dynamic
Gets or sets a value indicating whether the signal is dynamic. If a signal is dynamic, it cannot be given a name in this attribute and the method must accept a string name and an array of IRawValue.
public bool Dynamic { get; set; }
Property Value
Name
Gets the workflow signal name. If this is unset, it defaults to the unqualified method name. If the method name ends with "Async", that is trimmed off when creating the default.
public string? Name { get; }
Property Value
UnfinishedPolicy
Gets or sets the actions taken if a workflow exits with a running instance of this handler. Default is WarnAndAbandon.
public HandlerUnfinishedPolicy UnfinishedPolicy { get; set; }