From 99d1bee2eddf58c5923dd2ba712002b5d77b15d1 Mon Sep 17 00:00:00 2001 From: F1rsTTeaM Date: Sun, 17 Nov 2024 13:40:59 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B8=20=D0=BF=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=82=D0=B5=D0=B9?= =?UTF-8?q?=D0=BD=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FuelAndLubricants.csproj | 4 ++++ .../FuelAndLubricants/Program.cs | 20 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/FuelAndLubricants/FuelAndLubricants/FuelAndLubricants.csproj b/FuelAndLubricants/FuelAndLubricants/FuelAndLubricants.csproj index 663fdb8..894afcd 100644 --- a/FuelAndLubricants/FuelAndLubricants/FuelAndLubricants.csproj +++ b/FuelAndLubricants/FuelAndLubricants/FuelAndLubricants.csproj @@ -8,4 +8,8 @@ enable + + + + \ No newline at end of file diff --git a/FuelAndLubricants/FuelAndLubricants/Program.cs b/FuelAndLubricants/FuelAndLubricants/Program.cs index 9b4d241..dd083d0 100644 --- a/FuelAndLubricants/FuelAndLubricants/Program.cs +++ b/FuelAndLubricants/FuelAndLubricants/Program.cs @@ -1,3 +1,7 @@ +using FuelAndLubricants.Repositories; +using FuelAndLubricants.Repositories.Implementations; +using Unity; + namespace FuelAndLubricants { internal static class Program @@ -11,7 +15,21 @@ namespace FuelAndLubricants // To customize application configuration such as set high DPI settings or default font, // see https://aka.ms/applicationconfiguration. ApplicationConfiguration.Initialize(); - Application.Run(new Form1()); + Application.Run(CreateContainer().Resolve()); + } + + private static UnityContainer CreateContainer() + { + var container = new UnityContainer(); + + container.RegisterType(); + container.RegisterType(); + container.RegisterType(); + container.RegisterType(); + container.RegisterType(); + container.RegisterType(); + + return container; } } } \ No newline at end of file