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
ClientInterceptors
Gets or sets the client interceptors for the plugin.
public IReadOnlyCollection<IClientInterceptor>? ClientInterceptors { get; set; }
Property Value
ClientInterceptorsOption
Gets or sets the client interceptors option with configuration support.
public SimplePluginOptions.SimplePluginOption<IReadOnlyCollection<IClientInterceptor>?>? ClientInterceptorsOption { get; set; }
Property Value
DataConverter
Gets or sets the data converter for the plugin.
public DataConverter? DataConverter { get; set; }
Property Value
DataConverterOption
Gets or sets the data converter option with configuration support.
public SimplePluginOptions.SimplePluginOption<DataConverter>? DataConverterOption { get; set; }
Property Value
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
RunContextBefore
Gets or sets a function to run before running worker/replayer.
public Func<Task>? RunContextBefore { get; set; }
Property Value
WorkerInterceptors
Gets or sets the worker interceptors for the plugin.
public IReadOnlyCollection<IWorkerInterceptor>? WorkerInterceptors { get; set; }
Property Value
WorkerInterceptorsOption
Gets or sets the worker interceptors option with configuration support.
public SimplePluginOptions.SimplePluginOption<IReadOnlyCollection<IWorkerInterceptor>?>? WorkerInterceptorsOption { get; set; }
Property Value
WorkflowFailureExceptionTypes
Gets or sets the workflow failure exception types for the plugin.
public IReadOnlyCollection<Type>? WorkflowFailureExceptionTypes { get; set; }
Property Value
WorkflowFailureExceptionTypesOption
Gets or sets the workflow failure exception types option with configuration support.
public SimplePluginOptions.SimplePluginOption<IReadOnlyCollection<Type>?>? WorkflowFailureExceptionTypesOption { get; set; }
Property Value
Workflows
Gets the workflow definitions. Most users will use AddWorkflow to add to this list.
public IList<WorkflowDefinition> Workflows { get; }
Property Value
Methods
AddActivity(Delegate)
Add the given delegate with ActivityAttribute as an activity. This is usually a method reference.
public SimplePluginOptions AddActivity(Delegate del)
Parameters
delDelegateDelegate 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
definitionActivityDefinitionDefinition 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
typeTypeType to get activities from.
instanceobjectInstance 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
instanceTInstance to use when invoking. This must be non-null if any activities are non-static.
Returns
- SimplePluginOptions
This options instance for chaining.
Type Parameters
TType to get activities from.
AddNexusService(object)
Add the given Nexus service handler.
public SimplePluginOptions AddNexusService(object serviceHandler)
Parameters
serviceHandlerobjectService 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
typeTypeType 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
definitionWorkflowDefinitionDefinition 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
TType 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.