Class AsyncActivityHandle
- Namespace
- Temporalio.Client
- Assembly
- Temporalio.dll
Handle to perform activity actions for activities that will complete asynchronously.
public record AsyncActivityHandle : IEquatable<AsyncActivityHandle>
- Inheritance
-
AsyncActivityHandle
- Implements
- Inherited Members
Constructors
AsyncActivityHandle(ITemporalClient, Reference)
Handle to perform activity actions for activities that will complete asynchronously.
public AsyncActivityHandle(ITemporalClient Client, AsyncActivityHandle.Reference Activity)
Parameters
Client
ITemporalClientClient used for async activity handle calls.
Activity
AsyncActivityHandle.ReferenceReference to the activity for this handle.
Properties
Activity
Reference to the activity for this handle.
public AsyncActivityHandle.Reference Activity { get; init; }
Property Value
Client
Client used for async activity handle calls.
public ITemporalClient Client { get; init; }
Property Value
Methods
CompleteAsync(object?, AsyncActivityCompleteOptions?)
Complete this activity.
public Task CompleteAsync(object? result = null, AsyncActivityCompleteOptions? options = null)
Parameters
result
objectResult of the activity.
options
AsyncActivityCompleteOptionsCompletion options.
Returns
- Task
Completion task.
FailAsync(Exception, AsyncActivityFailOptions?)
Fail this activity.
public Task FailAsync(Exception exception, AsyncActivityFailOptions? options = null)
Parameters
exception
ExceptionException for the activity.
options
AsyncActivityFailOptionsFail options.
Returns
- Task
Completion task.
HeartbeatAsync(AsyncActivityHeartbeatOptions?)
Issue a heartbeat for this activity.
public Task HeartbeatAsync(AsyncActivityHeartbeatOptions? options = null)
Parameters
options
AsyncActivityHeartbeatOptionsHeartbeat options.
Returns
- Task
Completion task.
Exceptions
- AsyncActivityCanceledException
If the server has requested that this activity be cancelled. Users should catch this and invoke ReportCancellationAsync(AsyncActivityReportCancellationOptions?) for proper behavior.
ReportCancellationAsync(AsyncActivityReportCancellationOptions?)
Report this activity as cancelled.
public Task ReportCancellationAsync(AsyncActivityReportCancellationOptions? options = null)
Parameters
options
AsyncActivityReportCancellationOptionsCancel options.
Returns
- Task
Completion task.