Table of Contents

Class SimplePluginOptions

Namespace
Temporalio.Common
Assembly
Temporalio.dll

Configuration options for simple plugins.

public class SimplePluginOptions : ICloneable
Inheritance
SimplePluginOptions
Implements
Inherited Members

Remarks

WARNING: This API is experimental and may change in the future.

Properties

Activities

Gets the activity definitions. Most users will use AddActivity to add to this list.

public IList<ActivityDefinition> Activities { get; }

Property Value

IList<ActivityDefinition>

ClientInterceptors

Gets or sets the client interceptors for the plugin.

public IReadOnlyCollection<IClientInterceptor>? ClientInterceptors { get; set; }

Property Value

IReadOnlyCollection<IClientInterceptor>

ClientInterceptorsOption

Gets or sets the client interceptors option with configuration support.

public SimplePluginOptions.SimplePluginOption<IReadOnlyCollection<IClientInterceptor>?>? ClientInterceptorsOption { get; set; }

Property Value

SimplePluginOptions.SimplePluginOption<IReadOnlyCollection<IClientInterceptor>>

DataConverter

Gets or sets the data converter for the plugin.

public DataConverter? DataConverter { get; set; }

Property Value

DataConverter

DataConverterOption

Gets or sets the data converter option with configuration support.

public SimplePluginOptions.SimplePluginOption<DataConverter>? DataConverterOption { get; set; }

Property Value

SimplePluginOptions.SimplePluginOption<DataConverter>

NexusServices

Gets the Nexus service instances. Most users will use AddNexusService to add to this list.

public IList<ServiceHandlerInstance> NexusServices { get; }

Property Value

IList<ServiceHandlerInstance>

Remarks

WARNING: Nexus support is experimental.

RunContextAfter

Gets or sets a function to run after running worker/replayer.

public Func<Task>? RunContextAfter { get; set; }

Property Value

Func<Task>

RunContextBefore

Gets or sets a function to run before running worker/replayer.

public Func<Task>? RunContextBefore { get; set; }

Property Value

Func<Task>

WorkerInterceptors

Gets or sets the worker interceptors for the plugin.

public IReadOnlyCollection<IWorkerInterceptor>? WorkerInterceptors { get; set; }

Property Value

IReadOnlyCollection<IWorkerInterceptor>

WorkerInterceptorsOption

Gets or sets the worker interceptors option with configuration support.

public SimplePluginOptions.SimplePluginOption<IReadOnlyCollection<IWorkerInterceptor>?>? WorkerInterceptorsOption { get; set; }

Property Value

SimplePluginOptions.SimplePluginOption<IReadOnlyCollection<IWorkerInterceptor>>

WorkflowFailureExceptionTypes

Gets or sets the workflow failure exception types for the plugin.

public IReadOnlyCollection<Type>? WorkflowFailureExceptionTypes { get; set; }

Property Value

IReadOnlyCollection<Type>

WorkflowFailureExceptionTypesOption

Gets or sets the workflow failure exception types option with configuration support.

public SimplePluginOptions.SimplePluginOption<IReadOnlyCollection<Type>?>? WorkflowFailureExceptionTypesOption { get; set; }

Property Value

SimplePluginOptions.SimplePluginOption<IReadOnlyCollection<Type>>

Workflows

Gets the workflow definitions. Most users will use AddWorkflow to add to this list.

public IList<WorkflowDefinition> Workflows { get; }

Property Value

IList<WorkflowDefinition>

Methods

AddActivity(Delegate)

Add the given delegate with ActivityAttribute as an activity. This is usually a method reference.

public SimplePluginOptions AddActivity(Delegate del)

Parameters

del Delegate

Delegate to add.

Returns

SimplePluginOptions

This options instance for chaining.

AddActivity(ActivityDefinition)

Add the given activity definition. Most users will use AddActivity(Delegate) instead.

public SimplePluginOptions AddActivity(ActivityDefinition definition)

Parameters

definition ActivityDefinition

Definition to add.

Returns

SimplePluginOptions

This options instance for chaining.

AddAllActivities(Type, object?)

Add all methods on the given type with ActivityAttribute.

public SimplePluginOptions AddAllActivities(Type type, object? instance)

Parameters

type Type

Type to get activities from.

instance object

Instance to use when invoking. This must be non-null if any activities are non-static.

Returns

SimplePluginOptions

This options instance for chaining.

AddAllActivities<T>(T?)

Add all methods on the given type with ActivityAttribute.

public SimplePluginOptions AddAllActivities<T>(T? instance)

Parameters

instance T

Instance to use when invoking. This must be non-null if any activities are non-static.

Returns

SimplePluginOptions

This options instance for chaining.

Type Parameters

T

Type to get activities from.

AddNexusService(object)

Add the given Nexus service handler.

public SimplePluginOptions AddNexusService(object serviceHandler)

Parameters

serviceHandler object

Service handler to add. It is expected to be an instance of a class with a NexusRpc.Handlers.NexusServiceHandlerAttribute attribute.

Returns

SimplePluginOptions

This options instance for chaining.

Remarks

WARNING: Nexus support is experimental.

AddWorkflow(Type)

Add the given type as a workflow.

public SimplePluginOptions AddWorkflow(Type type)

Parameters

type Type

Type to add.

Returns

SimplePluginOptions

This options instance for chaining.

AddWorkflow(WorkflowDefinition)

Add the given workflow definition. Most users will use AddWorkflow<T>() instead.

public SimplePluginOptions AddWorkflow(WorkflowDefinition definition)

Parameters

definition WorkflowDefinition

Definition to add.

Returns

SimplePluginOptions

This options instance for chaining.

AddWorkflow<T>()

Add the given type as a workflow.

public SimplePluginOptions AddWorkflow<T>()

Returns

SimplePluginOptions

This options instance for chaining.

Type Parameters

T

Type to add.

Clone()

Create a shallow copy of these options.

public virtual object Clone()

Returns

object

A shallow copy of these options and any transitive options fields. Also copies collections of activities and workflows.