25 lines
636 B
C#
25 lines
636 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 StammGenerator.HostBuilders
|
|
{
|
|
static class AddConfigurationHostBuilderExtensions
|
|
{
|
|
public static IHostBuilder AddConfiguration(this IHostBuilder hostBuilder)
|
|
{
|
|
hostBuilder.ConfigureAppConfiguration(c =>
|
|
{
|
|
c.AddJsonFile("appsettings.json");
|
|
c.AddEnvironmentVariables();
|
|
}
|
|
);
|
|
return hostBuilder;
|
|
}
|
|
}
|
|
}
|