From 68f3a8eb518e2c4fe89fa3428ab50769e7df4b4c Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Sat, 1 Apr 2023 21:03:14 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=8B=D1=82=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=20=D0=BC=D0=B8=D0=B3=D1=80=D0=B0=D1=86=D0=B8=D1=8E.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BankYouBankruptView.csproj | 16 ++++++++++++ BankYouBankrupt/BankYouBankrupt/Program.cs | 25 +++++++++++++++++-- .../Implements/CardStorage.cs | 12 +++++++++ .../Implements/ClientStorage.cs | 12 +++++++++ 4 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CardStorage.cs create mode 100644 BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/ClientStorage.cs diff --git a/BankYouBankrupt/BankYouBankrupt/BankYouBankruptView.csproj b/BankYouBankrupt/BankYouBankrupt/BankYouBankruptView.csproj index b57c89e..377ee20 100644 --- a/BankYouBankrupt/BankYouBankrupt/BankYouBankruptView.csproj +++ b/BankYouBankrupt/BankYouBankrupt/BankYouBankruptView.csproj @@ -8,4 +8,20 @@ enable + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + \ No newline at end of file diff --git a/BankYouBankrupt/BankYouBankrupt/Program.cs b/BankYouBankrupt/BankYouBankrupt/Program.cs index 0556107..14b3280 100644 --- a/BankYouBankrupt/BankYouBankrupt/Program.cs +++ b/BankYouBankrupt/BankYouBankrupt/Program.cs @@ -1,19 +1,40 @@ using BankYouBankrupt; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using NLog.Extensions.Logging; +using BankYouBankruptDatabaseImplement.Models; +using System; namespace BankYouBankruptView { internal static class Program { + private static ServiceProvider? _serviceProvider; + + public static ServiceProvider? ServiceProvider => _serviceProvider; + /// /// The main entry point for the application. /// [STAThread] static void Main() { - // To customize application configuration such as set high DPI settings or default font, + // To customize application configuration such as set high DPI settings or default font; // see https://aka.ms/applicationconfiguration. ApplicationConfiguration.Initialize(); - Application.Run(new Form1()); + var services = new ServiceCollection(); + ConfigureServices(services); + _serviceProvider = services.BuildServiceProvider(); + Application.Run(_serviceProvider.GetRequiredService()); + } + + private static void ConfigureServices(ServiceCollection services) + { + services.AddLogging(option => + { + option.SetMinimumLevel(LogLevel.Information); + option.AddNLog("nlog.config"); + }); } } } \ No newline at end of file diff --git a/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CardStorage.cs b/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CardStorage.cs new file mode 100644 index 0000000..19ce171 --- /dev/null +++ b/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CardStorage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BankYouBankruptDatabaseImplement.Implements +{ + public class CardStorage + { + } +} diff --git a/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/ClientStorage.cs b/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/ClientStorage.cs new file mode 100644 index 0000000..75e05d2 --- /dev/null +++ b/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/ClientStorage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BankYouBankruptDatabaseImplement.Implements +{ + public class ClientStorage + { + } +}