Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.32 KB

Providers.md

File metadata and controls

32 lines (23 loc) · 1.32 KB

Settings providers

List of implemented settings providers:

Provider name NuGet package
JSON-file Structr.Configuration
XML-file Structr.Configuration
In-Memory Structr.Configuration
Consul Structr.Configuration.Consul

Settings provider options

When you setup settings provider you can configure provider options represents by SettingsProviderOptions.

SettingsProviderOptions properties:

Property name Property type Description
Cache bool Determines whether settings should be cached, true by default.

Example configure services:

services.AddConfiguration()
    .AddJson<SmtpEmailSettings>("path_to_json_file", (serviceProvider, options) =>
    {
        options.Cache = true;
    });

If Cache options was setting up to true then settings provider return cached settings while IsSettingsModified() returns false, otherwise every settings request invoke LoadSettings() method.