Class ServiceProviderExtensions
- Namespace
- Arc4u.Configuration.Store
- Assembly
- Arc4u.Configuration.Store.dll
Extension methods to start the section store configuration once the service provider is built.
public static class ServiceProviderExtensions
- Inheritance
-
ServiceProviderExtensions
- Inherited Members
Methods
UseSectionStoreConfiguration(IServiceProvider)
This needs to be called AFTER the settings store (e.g. the Database Context) is fully defined.
It creates, in the store, the sections declared with AddSectionStoreConfiguration that do not exist yet
and enables the reloading of the configuration when the store changes.
public static IServiceProvider UseSectionStoreConfiguration(this IServiceProvider serviceProvider)
Parameters
serviceProviderIServiceProviderThe built service provider.
Returns
- IServiceProvider
The same service provider, to chain calls.
Examples
var app = builder.Build();
app.Services.UseSectionStoreConfiguration();