Skip to content

JournalingHostingExtensions.AddStateMachine(IServiceCollection, Func<IServiceProvider, string, TImplementation>)

AddStateMachine(IServiceCollection, Func<IServiceProvider, string, TImplementation>)

staticextension
View source
public static IServiceCollection AddStateMachine<TState, TImplementation>(this IServiceCollection services, Func<IServiceProvider, string, TImplementation> factory)
Registers a factory for a custom durable state contract.

Parameters

servicesIServiceCollection
The service collection.
factoryFunc<IServiceProvider, string, TImplementation>
Creates a state component using its activation's service scope and stable state name.

Returns

The service collection.