public static IConfigurationBuilder AddGatewayFile(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(Path.GetDirectoryName(path)); path = Path.GetFileName(path); } var source = new GatewayConfigurationSource { FileProvider = provider, Path = path, Optional = optional, ReloadOnChange = reloadOnChange }; builder.Add(source); AppConfig.Configuration = builder.Build(); return(builder); }
public GatewayConfigurationProvider(GatewayConfigurationSource source) : base(source) { }