45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
using MotorPlantBusinessLogics.BusinessLogics;
|
|
using MotorPlantContracts.BusinessLogicsContracts;
|
|
using MotorPlantContracts.StoragesContracts;
|
|
using MotorPlantListImplement.Implements;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Logging;
|
|
using NLog.Extensions.Logging;
|
|
|
|
namespace MotorPlantView
|
|
{
|
|
internal static class Program
|
|
{
|
|
private static ServiceProvider? _serviceProvider;
|
|
public static ServiceProvider? ServiceProvider => _serviceProvider;
|
|
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
|
|
}
|
|
|
|
private static void ConfigureServices(ServiceCollection services)
|
|
{
|
|
services.AddLogging(option =>
|
|
{
|
|
option.SetMinimumLevel(LogLevel.Information);
|
|
option.AddNLog("nlog.config");
|
|
});
|
|
services.AddTransient<IComponentStorage, ComponentStorage>();
|
|
services.AddTransient<IOrderStorage, OrderStorage>();
|
|
services.AddTransient<IEngineStorage, EngineStorage>();
|
|
|
|
services.AddTransient<IComponentLogic, ComponentLogic>();
|
|
services.AddTransient<IOrderLogic, OrderLogic>();
|
|
services.AddTransient<IEngineLogic, EngineLogic>();
|
|
|
|
services.AddTransient<FormMain>();
|
|
services.AddTransient<FormComponent>();
|
|
services.AddTransient<FormComponents>();
|
|
services.AddTransient<FormCreateOrder>();
|
|
services.AddTransient<FormEngine>();
|
|
services.AddTransient<FormEngineComponent>();
|
|
}
|
|
}
|
|
} |