Table of Contents

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

string

Service

Gets the name of the callback service.

public string Service { get; }

Property Value

string

SourceContext

Gets the source context that the callback operation receives.

public object? SourceContext { get; }

Property Value

object

TaskQueue

Gets the callback task queue in the namespace of the client that starts the Nexus operation.

public string TaskQueue { get; }

Property Value

string

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

service string

The name of the callback service.

operation string

The name of the callback operation.

taskQueue string

The task queue that runs the callback operation.

sourceContext object

The 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

operationCall Expression<Func<TService, OnCompleteRequest<TOutput, TSourceContext>, OnCompleteResponse>>

An expression that selects the callback operation. The request parameter must be the operation's only argument.

taskQueue string

The task queue that runs the callback operation.

sourceContext TSourceContext

The source context that the callback operation receives.

Returns

CompletionCallback<TOutput>

The callback for the selected operation.

Type Parameters

TService

The callback service interface.

TOutput

The type of the source operation's result.

TSourceContext

The type of the source context.

Remarks

WARNING: This API is experimental and may change.