Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 761 Bytes

File metadata and controls

28 lines (22 loc) · 761 Bytes

Nemi.Extensions.Configuration.Yaml

YAML extension for ASP.NET Core Configuration

NuGet Package

Nuget Package : https://www.nuget.org/packages/Nemi.Extensions.Configuration.Yaml

Install-Package Nemi.Extensions.Configuration.Yaml

.NET CLI

dotnet add package Nemi.Extensions.Configuration.Yaml

Usages

add AddYamlFile method in startup class

   public Startup(IHostingEnvironment env)
	{
		var builder =new ConfigurationBuilder();
		builder.SetBasePath(env.ContentRootPath);
		builder.AddYamlFile("config.yaml",optional: false);

		Configuration = builder.Build();
	}