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
providerIServiceProviderService provider for creating the instance if the method is non-static.
instanceTypeTypeType of the instance.
methodMethodInfoMethod 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
providerIServiceProviderService provider for creating the instance for non-static activities.
typeTypeType 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
providerIServiceProviderService provider for creating the instance for non-static activities.
Returns
- IReadOnlyCollection<ActivityDefinition>
Collection of activity definitions.
Type Parameters
TType to create activity definitions from.