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
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; }