/// <summary>
        /// Adds the Yaml configuration provider at path to builder.
        /// </summary>
        /// <param name="builder">The builder to add to.</param>
        /// <param name="path">The file path and name</param>
        /// <param name="optional">Whether the file is optional.</param>
        /// <returns>The <see cref="IConfigurationBuilder"/>.</returns>
        public static IConfigurationBuilder AddYamlFile(this IConfigurationBuilder builder, string path, bool optional)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            var yamlConfigurationSource = new YamlConfigurationSource
            {
                Path     = path,
                Optional = optional,
            };

            yamlConfigurationSource.ResolveFileProvider();

            return(builder.Add(yamlConfigurationSource));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="YamlConfigurationProvider"/> class.
 /// </summary>
 /// <param name="source">The source settings</param>
 public YamlConfigurationProvider(YamlConfigurationSource source)
     : base(source)
 {
 }