Extending - Loaders
It's very easy to add custom providers.
Custom Implementation
PerigeeApplication.ApplicationNoInit("DemoApp", (c) => {
//Add ConfigurationSource to the builder
c.ConfigureConfiguration((builder, EnvStr) => {
builder.Add(new SQLConfigurationSource("connectionString", "select [name], [value] from dbo.configs", "sql"));
});
//Reload all providers
c.ReloadProviders();
//Reload the specific provider
c.ReloadProvidersOfType(typeof(SQLConfigurationProvider));
string MyValueFromSQL = c.GetValue<string>("sql:MyValue");
});Using the built in SQL Provider
Last updated

