Beispiel #1
0
 public TemplateFormattedConfigurationProvider(TemplateFormattedConfiguration templateFormattedConfigurationSource)
 {
     _configuration          = templateFormattedConfigurationSource.Configuration;
     _startChar              = templateFormattedConfigurationSource.TemplatedConfigurationSettings.TemplateCharacterStart;
     _endChar                = templateFormattedConfigurationSource.TemplatedConfigurationSettings.TemplateCharacterEnd;
     _escapeChar             = templateFormattedConfigurationSource.TemplatedConfigurationSettings.EscapeTemplateCharacter;
     _removeEscapeCharacters = templateFormattedConfigurationSource.TemplatedConfigurationSettings.RemoveEscapedCharacters;
     _throwIfNotFound        = templateFormattedConfigurationSource.TemplatedConfigurationSettings.ThrowIfNotFound;
 }
Beispiel #2
0
        public static IConfiguration EnableTemplatedConfiguration(this IConfiguration configuration,
                                                                  TemplateFormattedConfigurationSettings settings = null)
        {
            settings ??= new TemplateFormattedConfigurationSettings();
            var formattedConfiguration = new TemplateFormattedConfiguration(settings, configuration);

            formattedConfiguration.Run();
            return(configuration);
        }