2024-05-21 01:53:54 +04:00
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
using NLog.Extensions.Logging
|
|
|
|
|
|
|
|
namespace AirBomber;
|
|
|
|
|
|
|
|
internal static class Program
|
2024-02-27 12:54:24 +04:00
|
|
|
{
|
2024-05-21 01:53:54 +04:00
|
|
|
/// <summary>
|
|
|
|
/// The main entry point for the application.
|
|
|
|
/// </summary>
|
|
|
|
[STAThread]
|
|
|
|
static void Main()
|
2024-02-27 12:54:24 +04:00
|
|
|
{
|
2024-05-21 01:53:54 +04:00
|
|
|
// To customize application configuration such as set high DPI settings or default font,
|
|
|
|
// see https://aka.ms/applicationconfiguration.
|
|
|
|
ServiceCollection services = new();
|
|
|
|
ConfigureServices(services);
|
|
|
|
ApplicationConfiguration.Initialize();
|
|
|
|
Application.Run(new FormAirPlaneCollection());
|
2024-02-27 12:54:24 +04:00
|
|
|
}
|
2024-05-21 01:53:54 +04:00
|
|
|
|
|
|
|
private static void ConfigureServices(ServiceCollection services)
|
|
|
|
{
|
|
|
|
services.AddSingleton<FormAirPlaneCollection>()
|
|
|
|
.AddLogging(option =>
|
|
|
|
{
|
|
|
|
option.SetMinimumLevel(LogLevel.Information);
|
|
|
|
option.AddNLog("nlog.config");
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|