Table of Contents

Class WorkflowQueryAttribute

Namespace
Temporalio.Workflows
Assembly
Temporalio.dll

Designate a method as a query handler.

[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class WorkflowQueryAttribute : Attribute
Inheritance
WorkflowQueryAttribute
Inherited Members

Remarks

This is not inherited, so if a method is overridden, it must also have this attribute. The method must be a non-async method (i.e. cannot return a Task) and must return a non-void value.

Constructors

WorkflowQueryAttribute()

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

public WorkflowQueryAttribute()

WorkflowQueryAttribute(string)

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

public WorkflowQueryAttribute(string name)

Parameters

name string

Workflow query name to use. See Name.

Properties

Name

Gets the workflow query name. If this is unset, it defaults to the unqualified method name.

public string? Name { get; }

Property Value

string