31 lines
922 B
C#
31 lines
922 B
C#
using Microsoft.Extensions.Configuration;
|
|
|
|
|
|
using ServerCore;
|
|
|
|
/*=============================================================================================
|
|
|
|
ConfigurationBuilder 연동 지원 Helper 클래스
|
|
|
|
var configManager = new ConfigManager()
|
|
.addJson(1, "appsettings.json")
|
|
.addYaml(2, "settings.yaml");
|
|
|
|
var configuration = new ConfigurationBuilder()
|
|
.addConfigManager(configManager)
|
|
.Build();
|
|
|
|
var mySetting = configuration["MyApp:Setting"];
|
|
|
|
|
|
author : kangms
|
|
|
|
=============================================================================================*/
|
|
|
|
public static class ConfigManagerHelper
|
|
{
|
|
public static IConfigurationBuilder addConfigManager(this IConfigurationBuilder builder, ConfigManager manager)
|
|
{
|
|
return builder.Add(new ConfigManagerConfigurationSource(manager));
|
|
}
|
|
} |