Class CompletionCallback
- Namespace
- Temporalio.Nexus
- Assembly
- Temporalio.dll
A callback that reports the result or failure of a Nexus operation.
public abstract class CompletionCallback
- Inheritance
-
CompletionCallback
- Derived
-
CompletionCallback<TOutput>
- Inherited Members
Remarks
WARNING: This API is experimental and may change.
Properties
Operation
Gets the name of the callback operation.
public string Operation { get; }
Property Value
Service
Gets the name of the callback service.
public string Service { get; }
Property Value
SourceContext
Gets the source context that the callback operation receives.
public object? SourceContext { get; }
Property Value
TaskQueue
Gets the callback task queue in the namespace of the client that starts the Nexus operation.
public string TaskQueue { get; }
Property Value
Methods
Create(string, string, string, object?)
Creates a callback from service and operation names.
public static CompletionCallback<RawValue> Create(string service, string operation, string taskQueue, object? sourceContext)
Parameters
servicestringThe name of the callback service.
operationstringThe name of the callback operation.
taskQueuestringThe task queue that runs the callback operation.
sourceContextobjectThe source context that the callback operation receives.
Returns
- CompletionCallback<RawValue>
A callback that can be added to any output collection.
Remarks
WARNING: This API is experimental and may change.
Create<TService, TOutput, TSourceContext>(Expression<Func<TService, OnCompleteRequest<TOutput, TSourceContext>, OnCompleteResponse>>, string, TSourceContext)
Creates a callback from an operation expression without calling the operation.
public static CompletionCallback<TOutput> Create<TService, TOutput, TSourceContext>(Expression<Func<TService, OnCompleteRequest<TOutput, TSourceContext>, OnCompleteResponse>> operationCall, string taskQueue, TSourceContext sourceContext)
Parameters
operationCallExpression<Func<TService, OnCompleteRequest<TOutput, TSourceContext>, OnCompleteResponse>>An expression that selects the callback operation. The request parameter must be the operation's only argument.
taskQueuestringThe task queue that runs the callback operation.
sourceContextTSourceContextThe source context that the callback operation receives.
Returns
- CompletionCallback<TOutput>
The callback for the selected operation.
Type Parameters
TServiceThe callback service interface.
TOutputThe type of the source operation's result.
TSourceContextThe type of the source context.
Remarks
WARNING: This API is experimental and may change.