Table of Contents

Class ServiceProviderExtensions

Namespace
Temporalio.Extensions.Hosting
Assembly
Temporalio.Extensions.Hosting.dll

Temporal extension methods for IServiceProvider.

public static class ServiceProviderExtensions
Inheritance
ServiceProviderExtensions
Inherited Members

Methods

CreateTemporalActivityDefinition(IServiceProvider, Type, MethodInfo)

Create activity definition for the given activity-attributed method on the given instance type. If the method is non-static, this will use the service provider to get the instance to call the method on.

public static ActivityDefinition CreateTemporalActivityDefinition(this IServiceProvider provider, Type instanceType, MethodInfo method)

Parameters

provider IServiceProvider

Service provider for creating the instance if the method is non-static.

instanceType Type

Type of the instance.

method MethodInfo

Method to create activity definition from.

Returns

ActivityDefinition

Created definition.

CreateTemporalActivityDefinitions(IServiceProvider, Type)

Create activity definitions for every activity-attributed method on the given type. For non-static methods, this will use the service provider to get the instance to call the method on.

public static IReadOnlyCollection<ActivityDefinition> CreateTemporalActivityDefinitions(this IServiceProvider provider, Type type)

Parameters

provider IServiceProvider

Service provider for creating the instance for non-static activities.

type Type

Type to create activity definitions from.

Returns

IReadOnlyCollection<ActivityDefinition>

Collection of activity definitions.

CreateTemporalActivityDefinitions<T>(IServiceProvider)

Create activity definitions for every activity-attributed method on the given type. For non-static methods, this will use the service provider to get the instance to call the method on.

public static IReadOnlyCollection<ActivityDefinition> CreateTemporalActivityDefinitions<T>(this IServiceProvider provider)

Parameters

provider IServiceProvider

Service provider for creating the instance for non-static activities.

Returns

IReadOnlyCollection<ActivityDefinition>

Collection of activity definitions.

Type Parameters

T

Type to create activity definitions from.