27 lines
953 B
C#
27 lines
953 B
C#
using Microsoft.Extensions.Configuration;
|
|
using Serilog;
|
|
|
|
namespace ProjectMachine
|
|
{
|
|
internal static class Program
|
|
{
|
|
/// <summary>
|
|
/// The main entry point for the application.
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
var configuration = new ConfigurationBuilder()
|
|
.SetBasePath(Directory.GetCurrentDirectory())
|
|
.AddJsonFile("appconfig.json")
|
|
.AddJsonFile($"appconfig.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"}.json", true)
|
|
.Build();
|
|
var Logger = new LoggerConfiguration()
|
|
.MinimumLevel.Information()
|
|
.ReadFrom.Configuration(configuration)
|
|
.CreateLogger();
|
|
ApplicationConfiguration.Initialize();
|
|
Application.Run(new FormMapWithSetTank(Logger));
|
|
}
|
|
}
|
|
} |