Exemplo n.º 1
0
        private static IConfigurationBuilder AddWebConfigFile(this IConfigurationBuilder builder, IFileProvider provider, string path, bool optional, bool reloadOnChange)
        {
            if (provider == null && Path.IsPathRooted(path))
            {
                provider = new PhysicalFileProvider(Path.GetDirectoryName(path));
                path     = Path.GetFileName(path);
            }
            var source = new WebConfigurationSource
            {
                FileProvider   = provider,
                Path           = path,
                Optional       = optional,
                ReloadOnChange = reloadOnChange
            };

            builder.Add(source);
            return(builder);
        }
Exemplo n.º 2
0
 public WebConfigurationProvider(WebConfigurationSource source) : base(source)
 {
 }