nacos-sdk-csharp.Extensions.Configuration 1.3.4-alpha20220810140416
nacos-sdk-csharp.Extensions.Configuration
nacos-sdk-csharp.Extensions.Configuration provides integration with ASP.NET Core Configuration System.
builder.Host.UseNacosConfig(section: "NacosConfig");
// or
builder.Host.ConfigureAppConfiguration((c, b) =>
{
var config = b.Build();
// read configuration from config files
// default is json
// b.AddNacosV2Configuration(config.GetSection("NacosConfig"));
b.AddNacosV2Configuration(config.GetSection("NacosConfig"));
// specify ini or yaml
b.AddNacosV2Configuration(config.GetSection("NacosConfig"), parser: Nacos.IniParser.IniConfigurationStringParser.Instance);
b.AddNacosV2Configuration(config.GetSection("NacosConfig"), parser: Nacos.YamlParser.YamlConfigurationStringParser.Instance);
});
Links
No packages depend on nacos-sdk-csharp.Extensions.Configuration.
.NET 5.0
- nacos-sdk-csharp (>= 1.3.4-alpha20220810140416)
- Newtonsoft.Json (>= 13.0.1)
- Microsoft.Extensions.Options (>= 5.0.0)
- Microsoft.Extensions.Logging.Console (>= 5.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Configuration (>= 5.0.0)
.NET Standard 2.0
- Newtonsoft.Json (>= 13.0.1)
- Microsoft.Extensions.Options (>= 3.1.0)
- Microsoft.Extensions.Logging.Console (>= 3.1.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 3.1.0)
- Microsoft.Extensions.Configuration (>= 3.1.0)
- nacos-sdk-csharp (>= 1.3.4-alpha20220810140416)
.NET 6.0
- Newtonsoft.Json (>= 13.0.1)
- Microsoft.Extensions.Logging.Console (>= 6.0.0)
- Microsoft.Extensions.Options (>= 6.0.0)
- Microsoft.Extensions.Configuration (>= 6.0.0)
- nacos-sdk-csharp (>= 1.3.4-alpha20220810140416)
- Microsoft.Extensions.Hosting.Abstractions (>= 6.0.0)