Class WorkflowRunOperationHandler
- Namespace
- Temporalio.Nexus
- Assembly
- Temporalio.dll
Helpers for creating operation handlers backed by Temporal workflows.
public static class WorkflowRunOperationHandler
- Inheritance
-
WorkflowRunOperationHandler
- Inherited Members
Remarks
WARNING: Nexus support is experimental.
Methods
FromHandleFactory(Func<WorkflowRunOperationContext, Task<NexusWorkflowRunHandle>>)
Create an operation handler with no return and no input from the given handle factory.
public static IOperationHandler<NoValue, NoValue> FromHandleFactory(Func<WorkflowRunOperationContext, Task<NexusWorkflowRunHandle>> handleFactory)
Parameters
handleFactory
Func<WorkflowRunOperationContext, Task<NexusWorkflowRunHandle>>Handle factory invoked on every operation start. The factory function is expected to use the given context to
StartWorkflowAsync
and return the workflow run handle.
Returns
- IOperationHandler<NoValue, NoValue>
Operation handler backed by a workflow.
FromHandleFactory<TResult>(Func<WorkflowRunOperationContext, Task<NexusWorkflowRunHandle<TResult>>>)
Create an operation handler with no input from the given handle factory.
public static IOperationHandler<NoValue, TResult> FromHandleFactory<TResult>(Func<WorkflowRunOperationContext, Task<NexusWorkflowRunHandle<TResult>>> handleFactory)
Parameters
handleFactory
Func<WorkflowRunOperationContext, Task<NexusWorkflowRunHandle<TResult>>>Handle factory invoked on every operation start. The factory function is expected to use the given context to
StartWorkflowAsync
and return the workflow run handle.
Returns
- IOperationHandler<NoValue, TResult>
Operation handler backed by a workflow.
Type Parameters
TResult
Operation return type.
FromHandleFactory<TInput>(Func<WorkflowRunOperationContext, TInput, Task<NexusWorkflowRunHandle>>)
Create an operation handler with no return from the given handle factory.
public static IOperationHandler<TInput, NoValue> FromHandleFactory<TInput>(Func<WorkflowRunOperationContext, TInput, Task<NexusWorkflowRunHandle>> handleFactory)
Parameters
handleFactory
Func<WorkflowRunOperationContext, TInput, Task<NexusWorkflowRunHandle>>Handle factory invoked on every operation start. The factory function is expected to use the given context to
StartWorkflowAsync
and return the workflow run handle.
Returns
- IOperationHandler<TInput, NoValue>
Operation handler backed by a workflow.
Type Parameters
TInput
Operation input type.
FromHandleFactory<TInput, TResult>(Func<WorkflowRunOperationContext, TInput, Task<NexusWorkflowRunHandle<TResult>>>)
Create an operation handler from the given handle factory.
public static IOperationHandler<TInput, TResult> FromHandleFactory<TInput, TResult>(Func<WorkflowRunOperationContext, TInput, Task<NexusWorkflowRunHandle<TResult>>> handleFactory)
Parameters
handleFactory
Func<WorkflowRunOperationContext, TInput, Task<NexusWorkflowRunHandle<TResult>>>Handle factory invoked on every operation start. The factory function is expected to use the given context to
StartWorkflowAsync
and return the workflow run handle.
Returns
- IOperationHandler<TInput, TResult>
Operation handler backed by a workflow.
Type Parameters
TInput
Operation input type.
TResult
Operation return type.