-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
33 lines (28 loc) · 899 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Configuration;
using System;
namespace Designer_Offer
{
public static class Program
{
[STAThread]
public static void Main()
{
var app = new App();
app.InitializeComponent();
app.Run();
}
public static IHostBuilder CreateHostBuilder(string[] Args)
{
var host_builder = Host.CreateDefaultBuilder(Args);
host_builder.UseContentRoot(App.CurrentDirectory);
host_builder.ConfigureAppConfiguration((host, cfg) =>
{
cfg.SetBasePath(App.CurrentDirectory);
cfg.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
});
host_builder.ConfigureServices(App.ConfigureServices);
return host_builder;
}
}
}