From 86ab92700568461a89a305ed1002ffe2a983b851 Mon Sep 17 00:00:00 2001 From: Basique Evangelist Date: Thu, 18 Apr 2019 15:43:57 +0300 Subject: [PATCH] Update to new Perfusion --- JetKarmaBot/JetKarmaBot.cs | 4 ++-- JetKarmaBot/JetKarmaBot.csproj | 2 +- JetKarmaBot/Services/KarmaContextFactory.cs | 2 +- JetKarmaBot/Services/Localization.cs | 2 +- JetKarmaBot/Services/LogInfo.cs | 2 +- perfusion | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/JetKarmaBot/JetKarmaBot.cs b/JetKarmaBot/JetKarmaBot.cs index 044b0a9..2c344a5 100644 --- a/JetKarmaBot/JetKarmaBot.cs +++ b/JetKarmaBot/JetKarmaBot.cs @@ -17,7 +17,7 @@ namespace JetKarmaBot public class JetKarmaBot : IDisposable { [Inject] Config Config { get; set; } - [Inject] Container Container { get; set; } + [Inject] IContainer Container { get; set; } [Inject] KarmaContextFactory Db { get; set; } TelegramBotClient Client { get; set; } @@ -70,7 +70,7 @@ namespace JetKarmaBot Task.Run(() => Commands.Execute(sender, messageEventArgs)); } - void InitCommands(Container c) + void InitCommands(IContainer c) { Commands = c.ResolveObject(new ChatCommandRouter(Me)); Commands.Add(c.ResolveObject(new HelpCommand(Commands))); diff --git a/JetKarmaBot/JetKarmaBot.csproj b/JetKarmaBot/JetKarmaBot.csproj index e74756c..c2aad83 100644 --- a/JetKarmaBot/JetKarmaBot.csproj +++ b/JetKarmaBot/JetKarmaBot.csproj @@ -1,7 +1,7 @@ Exe - netcoreapp2.1;net47; + netcoreapp2.1; diff --git a/JetKarmaBot/Services/KarmaContextFactory.cs b/JetKarmaBot/Services/KarmaContextFactory.cs index 88bade8..63da3b4 100644 --- a/JetKarmaBot/Services/KarmaContextFactory.cs +++ b/JetKarmaBot/Services/KarmaContextFactory.cs @@ -5,7 +5,7 @@ namespace JetKarmaBot.Services { public class KarmaContextFactory { - [Inject] Container C { get; set; } + [Inject] IContainer C { get; set; } public KarmaContext GetContext() => C.GetInstance(); } diff --git a/JetKarmaBot/Services/Localization.cs b/JetKarmaBot/Services/Localization.cs index bb4f250..a3489cb 100644 --- a/JetKarmaBot/Services/Localization.cs +++ b/JetKarmaBot/Services/Localization.cs @@ -14,7 +14,7 @@ namespace JetKarmaBot private Dictionary locales = new Dictionary(); [Inject] - public Localization(Container c) + public Localization(IContainer c) { c.ResolveObject(this); log.Info("Initializing..."); diff --git a/JetKarmaBot/Services/LogInfo.cs b/JetKarmaBot/Services/LogInfo.cs index b2729df..96c9363 100644 --- a/JetKarmaBot/Services/LogInfo.cs +++ b/JetKarmaBot/Services/LogInfo.cs @@ -7,7 +7,7 @@ namespace JetKarmaBot { public class LogInfo : ObjectInfo { - public override object GetInstance(Type requester = null) + public override object GetInstance(IContainer c, Type requester = null) { return LogManager.GetLogger(requester != null ? getTypeName(requester) : ""); } diff --git a/perfusion b/perfusion index a9503a6..834e1a2 160000 --- a/perfusion +++ b/perfusion @@ -1 +1 @@ -Subproject commit a9503a6b2cfa9166d4904ad995bc81d39ec9b2b7 +Subproject commit 834e1a25e96cbe120789457960c46afdea11f5bc