public static IConfigurationBuilder AddJsonFileEx(this IConfigurationBuilder builder, IFileProvider provider, string path, bool optional, bool reloadOnChange) { Check.NotNull(builder, "builder"); Check.CheckCondition(() => string.IsNullOrEmpty(path), "path"); if (provider == null && Path.IsPathRooted(path)) { provider = new PhysicalFileProvider(System.IO.Directory.GetCurrentDirectory()); path = Path.GetFileName(path); } var source = new Hummingbird.Extensions.Configuration.Json.JsonConfigurationSource { FileProvider = provider, Path = path, Optional = optional, ReloadOnChange = reloadOnChange }; builder.Add(source); return(builder); }
public JsonConfigurationProvider( JsonConfigurationSource source) : base(source) { }