24 lines
605 B
C#
24 lines
605 B
C#
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Hosting;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DaSaSo.Wpf.HostBuilders
|
|
{
|
|
public static class AddConfigurationHostBuilderExtensions
|
|
{
|
|
public static IHostBuilder AddConfiguration(this IHostBuilder host)
|
|
{
|
|
host.ConfigureAppConfiguration(c =>
|
|
{
|
|
c.AddJsonFile("appsettings.json");
|
|
c.AddEnvironmentVariables();
|
|
});
|
|
return host;
|
|
}
|
|
}
|
|
}
|