DurableTaskRegistry.AddActivity Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddActivity(ITaskActivity) |
Registers an activity singleton. |
AddActivity(Type) |
Registers an activity factory, resolving the provided type with the service provider. The TaskName used is derived from the provided type information. |
AddActivity(TaskName, ITaskActivity) |
Registers an activity singleton. |
AddActivity(TaskName, Func<IServiceProvider,ITaskActivity>) |
Registers an activity factory. |
AddActivity(TaskName, Type) |
Registers an activity factory, resolving the provided type with the service provider. |
AddActivity<TActivity>() |
Registers an activity factory, resolving the provided type with the service provider. The TaskName used is derived from the provided type information. |
AddActivity<TActivity>(TaskName) |
Registers an activity factory, resolving the provided type with the service provider. |
AddActivity(ITaskActivity)
Registers an activity singleton.
public Microsoft.DurableTask.DurableTaskRegistry AddActivity (Microsoft.DurableTask.ITaskActivity activity);
member this.AddActivity : Microsoft.DurableTask.ITaskActivity -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivity (activity As ITaskActivity) As DurableTaskRegistry
Parameters
- activity
- ITaskActivity
The orchestration instance to use.
Returns
The same registry, for call chaining.
Applies to
AddActivity(Type)
Registers an activity factory, resolving the provided type with the service provider. The TaskName used is derived from the provided type information.
public Microsoft.DurableTask.DurableTaskRegistry AddActivity (Type type);
member this.AddActivity : Type -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivity (type As Type) As DurableTaskRegistry
Parameters
- type
- Type
The activity type.
Returns
The same registry, for call chaining.
Applies to
AddActivity(TaskName, ITaskActivity)
Registers an activity singleton.
public Microsoft.DurableTask.DurableTaskRegistry AddActivity (Microsoft.DurableTask.TaskName name, Microsoft.DurableTask.ITaskActivity activity);
member this.AddActivity : Microsoft.DurableTask.TaskName * Microsoft.DurableTask.ITaskActivity -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivity (name As TaskName, activity As ITaskActivity) As DurableTaskRegistry
Parameters
- name
- TaskName
The name of the activity to register.
- activity
- ITaskActivity
The orchestration instance to use.
Returns
The same registry, for call chaining.
Applies to
AddActivity(TaskName, Func<IServiceProvider,ITaskActivity>)
Registers an activity factory.
public Microsoft.DurableTask.DurableTaskRegistry AddActivity (Microsoft.DurableTask.TaskName name, Func<IServiceProvider,Microsoft.DurableTask.ITaskActivity> factory);
member this.AddActivity : Microsoft.DurableTask.TaskName * Func<IServiceProvider, Microsoft.DurableTask.ITaskActivity> -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivity (name As TaskName, factory As Func(Of IServiceProvider, ITaskActivity)) As DurableTaskRegistry
Parameters
- name
- TaskName
The name of the activity.
- factory
- Func<IServiceProvider,ITaskActivity>
The activity factory.
Returns
This registry instance, for call chaining.
Exceptions
Applies to
AddActivity(TaskName, Type)
Registers an activity factory, resolving the provided type with the service provider.
public Microsoft.DurableTask.DurableTaskRegistry AddActivity (Microsoft.DurableTask.TaskName name, Type type);
member this.AddActivity : Microsoft.DurableTask.TaskName * Type -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivity (name As TaskName, type As Type) As DurableTaskRegistry
Parameters
- name
- TaskName
The name of the activity to register.
- type
- Type
The activity type.
Returns
The same registry, for call chaining.
Applies to
AddActivity<TActivity>()
Registers an activity factory, resolving the provided type with the service provider. The TaskName used is derived from the provided type information.
public Microsoft.DurableTask.DurableTaskRegistry AddActivity<TActivity> () where TActivity : class, Microsoft.DurableTask.ITaskActivity;
member this.AddActivity : unit -> Microsoft.DurableTask.DurableTaskRegistry (requires 'Activity : null and 'Activity :> Microsoft.DurableTask.ITaskActivity)
Public Function AddActivity(Of TActivity As {Class, ITaskActivity}) () As DurableTaskRegistry
Type Parameters
- TActivity
The type of activity to register.
Returns
The same registry, for call chaining.
Applies to
AddActivity<TActivity>(TaskName)
Registers an activity factory, resolving the provided type with the service provider.
public Microsoft.DurableTask.DurableTaskRegistry AddActivity<TActivity> (Microsoft.DurableTask.TaskName name) where TActivity : class, Microsoft.DurableTask.ITaskActivity;
member this.AddActivity : Microsoft.DurableTask.TaskName -> Microsoft.DurableTask.DurableTaskRegistry (requires 'Activity : null and 'Activity :> Microsoft.DurableTask.ITaskActivity)
Public Function AddActivity(Of TActivity As {Class, ITaskActivity}) (name As TaskName) As DurableTaskRegistry
Type Parameters
- TActivity
The type of activity to register.
Parameters
- name
- TaskName
The name of the activity to register.
Returns
The same registry, for call chaining.