Table of Contents

Class WorkflowAttribute

Namespace
Temporalio.Workflows
Assembly
Temporalio.dll

Designate a type as a workflow.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Interface, Inherited = false)]
public sealed class WorkflowAttribute : Attribute
Inheritance
WorkflowAttribute
Inherited Members

Remarks

This attribute is not inherited, so if a base class has this attribute the registered subclass must have it too. Workflows must have a no-arg constructor unless there is a constructor with WorkflowInitAttribute. All workflows must have a single WorkflowRunAttribute.

Constructors

WorkflowAttribute()

Initializes a new instance of the WorkflowAttribute class with the default name. See Name.

public WorkflowAttribute()

WorkflowAttribute(string)

Initializes a new instance of the WorkflowAttribute class with the given name.

public WorkflowAttribute(string name)

Parameters

name string

Workflow type name to use. See Name.

Properties

Name

Gets the workflow type name. If this is unset, it defaults to the unqualified type name. If the type is an interface and the first character is a capital "I" followed by another capital letter, the "I" is trimmed when creating the default name.

public string? Name { get; }

Property Value

string