Добавил DI, основные классы создаются через вбрасывание зависимостей через конструктор

This commit is contained in:
ftc
2024-01-20 16:56:44 +03:00
parent 77d563d500
commit 2a8348df44
7 changed files with 75 additions and 24 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ using System.Text;
using System.Text.Json;
using System.Threading;
using Telegram.Bot;
using ZaoBot.Config;
namespace ZaoBot
{
@@ -12,9 +13,9 @@ namespace ZaoBot
{
private JsonDocument config;
public NotificationReceiver(JsonDocument config)
public NotificationReceiver(IConfig config)
{
this.config = config;
this.config = config.Data;
}
public void Run()