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