Class DurableScheduleStoreRegistration
Registers an IScheduleStore together with, and inseparably from, its durability attestation, and installs the boot-time gate that refuses a volatile store the host never asked for.
public static class DurableScheduleStoreRegistration
- Inheritance
-
DurableScheduleStoreRegistration
- Inherited Members
Methods
AddDurableScheduleStore<TScheduleStore>(IServiceCollection)
Registers TScheduleStore as the singleton IScheduleStore and,
in the same act, attests that pending schedules survive a restart.
public static IServiceCollection AddDurableScheduleStore<TScheduleStore>(this IServiceCollection services) where TScheduleStore : class, IScheduleStore
Parameters
servicesIServiceCollectionThe service collection.
Returns
- IServiceCollection
The same IServiceCollection for chaining.
Type Parameters
TScheduleStoreThe durable schedule store implementation type.
Remarks
The singleton is created with ActivatorUtilities. A constructor marked with ActivatorUtilitiesConstructorAttribute takes precedence; otherwise the longest public constructor whose dependencies can be supplied is selected. Ambiguous or unsatisfied constructors fail resolution. This intentionally differs from ordinary implementation-type DI registration, which does not honor the preferred-constructor attribute. The container owns the resulting store once; no concrete/interface disposal alias is registered.
Exceptions
- ArgumentNullException
servicesis null.