Class ActivityAttribute
- Namespace
- Temporalio.Activities
- Assembly
- Temporalio.dll
Designate a method as an activity.
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class ActivityAttribute : Attribute
- Inheritance
-
ActivityAttribute
- Inherited Members
Remarks
This attribute is not inherited, so if a base class method has this attribute, its override must too.
Constructors
ActivityAttribute()
Initializes a new instance of the ActivityAttribute class with the default name. See Name.
public ActivityAttribute()
ActivityAttribute(string)
Initializes a new instance of the ActivityAttribute class with the given name.
public ActivityAttribute(string name)
Parameters
Properties
Dynamic
Gets or sets a value indicating whether the activity is dynamic. If an activity is dynamic, it cannot by given a name in this attribute and the method must accept an array of IRawValue.
public bool Dynamic { get; set; }
Property Value
Name
Gets the activity type name. If this is unset, it defaults to the unqualified method name (with "Async" trimmed off the end if present and the return type is a task).
public string? Name { get; }