public static IConfigurationBuilder AddAppConfig(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 AppConfigSource { FileProvider = provider, Path = path, Optional = optional, ReloadOnChange = reloadOnChange }; builder.Add(source); return(builder); }
public AppConfigProvider(AppConfigSource source) : base(source) { }