Class ActivityHandle<TResult>
- Namespace
- Temporalio.Client
- Assembly
- Temporalio.dll
Handle for a standalone activity with a known result type.
public record ActivityHandle<TResult> : ActivityHandle, IEquatable<ActivityHandle>, IEquatable<ActivityHandle<TResult>>
Type Parameters
TResultResult type of the activity.
- Inheritance
-
ActivityHandle<TResult>
- Implements
-
IEquatable<ActivityHandle<TResult>>
- Inherited Members
Remarks
WARNING: Standalone activities are experimental.
Constructors
ActivityHandle(ITemporalClient, string, string?)
Handle for a standalone activity with a known result type.
public ActivityHandle(ITemporalClient Client, string Id, string? RunId = null)
Parameters
ClientITemporalClientClient used for activity handle calls.
IdstringActivity ID.
RunIdstringActivity run ID if known.
Remarks
WARNING: Standalone activities are experimental.
Methods
GetResultAsync(RpcOptions?)
Wait for the result of the activity.
public Task<TResult> GetResultAsync(RpcOptions? rpcOptions = null)
Parameters
rpcOptionsRpcOptionsRPC options.
Returns
- Task<TResult>
Result of the activity.
Remarks
WARNING: Standalone activities are experimental.
Exceptions
- ActivityFailedException
Exception thrown for unsuccessful activity result.
- RpcException
Server-side error.