Skip to content

JournalingHostingExtensions Methods

Provides extensions for configuring journaling services.

AddJournalStorage(ISiloBuilder, string, Func<IServiceProvider, TProvider>)

staticextension
View source
public static ISiloBuilder AddJournalStorage<TProvider>(this ISiloBuilder builder, string name, Func<IServiceProvider, TProvider> factory)
Registers a named journal storage provider and its journaled state manager factory.

Parameters

builderISiloBuilder
The silo builder.
namestring
The provider name.
factoryFunc<IServiceProvider, TProvider>
The factory which creates the singleton provider.

Returns

The silo builder.

Exceptions

System.ArgumentNullException
The builder or factory is null.
System.ArgumentException
The provider name is empty or whitespace.
System.InvalidOperationException
The name is already registered with another provider type.

AddJournaling(ISiloBuilder)

staticextension
View source
public static ISiloBuilder AddJournaling(this ISiloBuilder builder)
Adds the services, durable state types, and journal formats required for journaling.

Parameters

builderISiloBuilder
The silo builder.

Returns

The silo builder.

AddStateMachine(IServiceCollection)

staticextension
View source
public static IServiceCollection AddStateMachine<TState, TImplementation>(this IServiceCollection services)
Registers a custom durable state contract and its state machine implementation.

Parameters

servicesIServiceCollection
The service collection.

Returns

The service collection.

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.

AddVolatileJournalStorage(ISiloBuilder)

staticextension
View source
public static ISiloBuilder AddVolatileJournalStorage(this ISiloBuilder builder)
Registers volatile in-memory journal storage as the default provider.

Parameters

builderISiloBuilder
The silo builder.

Returns

The silo builder.

AddVolatileJournalStorage(ISiloBuilder, string)

staticextension
View source
public static ISiloBuilder AddVolatileJournalStorage(this ISiloBuilder builder, string name)
Registers an independent named volatile in-memory journal storage provider.

Parameters

builderISiloBuilder
The silo builder.
namestring
The provider name.

Returns

The silo builder.