Skip to content

Commit

Permalink
Add configuration source ini, keyPerFile and xml
Browse files Browse the repository at this point in the history
  • Loading branch information
thohng committed May 31, 2024
1 parent 3a0dda6 commit e9a59ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,7 @@ ASALocalRun/
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb
healthchecksdb

# Local development
.local-dev
8 changes: 7 additions & 1 deletion src/WebApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.AspNetCore.SpaServices;
using NetLah.Diagnostics;
using NetLah.Extensions.ApplicationInsights;
using NetLah.Extensions.Configuration;
using NetLah.Extensions.Logging;
using NetLah.Extensions.SpaServices.Hosting;

Expand All @@ -12,7 +13,12 @@
ApplicationInfo.TryInitialize(null);
var builder = WebApplication.CreateBuilder(args);
builder.Configuration
.AddAddFileConfiguration()
.AddAddFileConfiguration(options =>
{
options.AddProvider("keyPerFile", KeyPerFileConfigurationBuilderExtensions.AddKeyPerFile, resolveAbsolute: true);
options.AddProvider(".ini", IniConfigurationExtensions.AddIniFile);
options.AddProvider(".xml", XmlConfigurationExtensions.AddXmlFile);
})
.AddTransformConfiguration()
.AddMapConfiguration();

Expand Down

0 comments on commit e9a59ea

Please sign in to comment.