DurableTaskRegistry.AddActivityFunc 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
AddActivityFunc(TaskName, Action<TaskActivityContext>)
Registers an activity factory, where the implementation is activity
.
public Microsoft.DurableTask.DurableTaskRegistry AddActivityFunc (Microsoft.DurableTask.TaskName name, Action<Microsoft.DurableTask.TaskActivityContext> activity);
member this.AddActivityFunc : Microsoft.DurableTask.TaskName * Action<Microsoft.DurableTask.TaskActivityContext> -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivityFunc (name As TaskName, activity As Action(Of TaskActivityContext)) As DurableTaskRegistry
Parameters
- name
- TaskName
The name of the activity to register.
- activity
- Action<TaskActivityContext>
The activity implementation.
Returns
The same registry, for call chaining.
Applies to
AddActivityFunc(TaskName, Func<TaskActivityContext,Task>)
Registers an activity factory, where the implementation is activity
.
public Microsoft.DurableTask.DurableTaskRegistry AddActivityFunc (Microsoft.DurableTask.TaskName name, Func<Microsoft.DurableTask.TaskActivityContext,System.Threading.Tasks.Task> activity);
member this.AddActivityFunc : Microsoft.DurableTask.TaskName * Func<Microsoft.DurableTask.TaskActivityContext, System.Threading.Tasks.Task> -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivityFunc (name As TaskName, activity As Func(Of TaskActivityContext, Task)) As DurableTaskRegistry
Parameters
- name
- TaskName
The name of the activity to register.
- activity
- Func<TaskActivityContext,Task>
The activity implementation.
Returns
The same registry, for call chaining.
Applies to
AddActivityFunc<TInput,TOutput>(TaskName, Func<TaskActivityContext,TInput,Task<TOutput>>)
Registers an activity factory, where the implementation is activity
.
public Microsoft.DurableTask.DurableTaskRegistry AddActivityFunc<TInput,TOutput> (Microsoft.DurableTask.TaskName name, Func<Microsoft.DurableTask.TaskActivityContext,TInput,System.Threading.Tasks.Task<TOutput>> activity);
member this.AddActivityFunc : Microsoft.DurableTask.TaskName * Func<Microsoft.DurableTask.TaskActivityContext, 'Input, System.Threading.Tasks.Task<'Output>> -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivityFunc(Of TInput, TOutput) (name As TaskName, activity As Func(Of TaskActivityContext, TInput, Task(Of TOutput))) As DurableTaskRegistry
Type Parameters
- TInput
The activity input type.
- TOutput
The activity output type.
Parameters
- name
- TaskName
The name of the activity to register.
- activity
- Func<TaskActivityContext,TInput,Task<TOutput>>
The activity implementation.
Returns
The same registry, for call chaining.
Applies to
AddActivityFunc<TInput,TOutput>(TaskName, Func<TaskActivityContext,TInput,TOutput>)
Registers an activity factory, where the implementation is activity
.
public Microsoft.DurableTask.DurableTaskRegistry AddActivityFunc<TInput,TOutput> (Microsoft.DurableTask.TaskName name, Func<Microsoft.DurableTask.TaskActivityContext,TInput,TOutput> activity);
member this.AddActivityFunc : Microsoft.DurableTask.TaskName * Func<Microsoft.DurableTask.TaskActivityContext, 'Input, 'Output> -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivityFunc(Of TInput, TOutput) (name As TaskName, activity As Func(Of TaskActivityContext, TInput, TOutput)) As DurableTaskRegistry
Type Parameters
- TInput
The activity input type.
- TOutput
The activity output type.
Parameters
- name
- TaskName
The name of the activity to register.
- activity
- Func<TaskActivityContext,TInput,TOutput>
The activity implementation.
Returns
The same registry, for call chaining.
Applies to
AddActivityFunc<TInput>(TaskName, Action<TaskActivityContext,TInput>)
Registers an activity factory, where the implementation is activity
.
public Microsoft.DurableTask.DurableTaskRegistry AddActivityFunc<TInput> (Microsoft.DurableTask.TaskName name, Action<Microsoft.DurableTask.TaskActivityContext,TInput> activity);
member this.AddActivityFunc : Microsoft.DurableTask.TaskName * Action<Microsoft.DurableTask.TaskActivityContext, 'Input> -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivityFunc(Of TInput) (name As TaskName, activity As Action(Of TaskActivityContext, TInput)) As DurableTaskRegistry
Type Parameters
- TInput
The activity input type.
Parameters
- name
- TaskName
The name of the activity to register.
- activity
- Action<TaskActivityContext,TInput>
The activity implementation.
Returns
The same registry, for call chaining.
Applies to
AddActivityFunc<TInput>(TaskName, Func<TaskActivityContext,TInput,Task>)
Registers an activity factory, where the implementation is activity
.
public Microsoft.DurableTask.DurableTaskRegistry AddActivityFunc<TInput> (Microsoft.DurableTask.TaskName name, Func<Microsoft.DurableTask.TaskActivityContext,TInput,System.Threading.Tasks.Task> activity);
member this.AddActivityFunc : Microsoft.DurableTask.TaskName * Func<Microsoft.DurableTask.TaskActivityContext, 'Input, System.Threading.Tasks.Task> -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivityFunc(Of TInput) (name As TaskName, activity As Func(Of TaskActivityContext, TInput, Task)) As DurableTaskRegistry
Type Parameters
- TInput
The activity input type.
Parameters
- name
- TaskName
The name of the activity to register.
- activity
- Func<TaskActivityContext,TInput,Task>
The activity implementation.
Returns
The same registry, for call chaining.
Applies to
AddActivityFunc<TOutput>(TaskName, Func<TaskActivityContext,Task<TOutput>>)
Registers an activity factory, where the implementation is activity
.
public Microsoft.DurableTask.DurableTaskRegistry AddActivityFunc<TOutput> (Microsoft.DurableTask.TaskName name, Func<Microsoft.DurableTask.TaskActivityContext,System.Threading.Tasks.Task<TOutput>> activity);
member this.AddActivityFunc : Microsoft.DurableTask.TaskName * Func<Microsoft.DurableTask.TaskActivityContext, System.Threading.Tasks.Task<'Output>> -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivityFunc(Of TOutput) (name As TaskName, activity As Func(Of TaskActivityContext, Task(Of TOutput))) As DurableTaskRegistry
Type Parameters
- TOutput
The activity output type.
Parameters
- name
- TaskName
The name of the activity to register.
- activity
- Func<TaskActivityContext,Task<TOutput>>
The activity implementation.
Returns
The same registry, for call chaining.
Applies to
AddActivityFunc<TOutput>(TaskName, Func<TaskActivityContext,TOutput>)
Registers an activity factory, where the implementation is activity
.
public Microsoft.DurableTask.DurableTaskRegistry AddActivityFunc<TOutput> (Microsoft.DurableTask.TaskName name, Func<Microsoft.DurableTask.TaskActivityContext,TOutput> activity);
member this.AddActivityFunc : Microsoft.DurableTask.TaskName * Func<Microsoft.DurableTask.TaskActivityContext, 'Output> -> Microsoft.DurableTask.DurableTaskRegistry
Public Function AddActivityFunc(Of TOutput) (name As TaskName, activity As Func(Of TaskActivityContext, TOutput)) As DurableTaskRegistry
Type Parameters
- TOutput
The activity output type.
Parameters
- name
- TaskName
The name of the activity to register.
- activity
- Func<TaskActivityContext,TOutput>
The activity implementation.
Returns
The same registry, for call chaining.