2024-04-22 13:33:00 +04:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using NLog.Extensions.Logging;
|
2024-05-06 14:10:23 +04:00
|
|
|
|
using Serilog;
|
2024-04-22 13:33:00 +04:00
|
|
|
|
|
2024-02-12 00:08:06 +04:00
|
|
|
|
namespace ProjectMonorail
|
2024-02-01 19:35:38 +04:00
|
|
|
|
{
|
|
|
|
|
internal static class Program
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The main entry point for the application.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[STAThread]
|
2024-04-22 13:33:00 +04:00
|
|
|
|
private static void Main()
|
2024-02-01 19:35:38 +04:00
|
|
|
|
{
|
|
|
|
|
ApplicationConfiguration.Initialize();
|
2024-04-22 13:33:00 +04:00
|
|
|
|
|
|
|
|
|
ServiceCollection services = new ServiceCollection();
|
|
|
|
|
ConfigureServices(services);
|
|
|
|
|
using ServiceProvider serviceProvider = services.BuildServiceProvider();
|
|
|
|
|
|
|
|
|
|
Application.Run(serviceProvider.GetRequiredService<FormMonorailCollection>());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DI
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="services"></param>
|
|
|
|
|
private static void ConfigureServices(ServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
services.AddSingleton<FormMonorailCollection>()
|
2024-05-06 14:10:23 +04:00
|
|
|
|
.AddLogging(option => option.AddSerilog(dispose: true));
|
|
|
|
|
|
|
|
|
|
Log.Logger = new LoggerConfiguration()
|
|
|
|
|
.MinimumLevel.Debug().WriteTo.File("C:\\<5C><><EFBFBD><EFBFBD><EFBFBD>\\PIbd-11_Tarasov_V.D._Simple\\ProjectMonorail\\log.txt").CreateLogger();
|
2024-02-01 19:35:38 +04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|