mirror of
https://github.com/Jetsparrow/karmabot.git
synced 2026-01-21 00:56:09 +03:00
Update to new Perfusion
This commit is contained in:
parent
7291318dcc
commit
86ab927005
@ -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)));
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFrameworks>netcoreapp2.1;net47;</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp2.1;</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.4">
|
||||
|
||||
@ -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<KarmaContext>();
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ namespace JetKarmaBot
|
||||
private Dictionary<string, Locale> locales = new Dictionary<string, Locale>();
|
||||
|
||||
[Inject]
|
||||
public Localization(Container c)
|
||||
public Localization(IContainer c)
|
||||
{
|
||||
c.ResolveObject(this);
|
||||
log.Info("Initializing...");
|
||||
|
||||
@ -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) : "<type unspecified>");
|
||||
}
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit a9503a6b2cfa9166d4904ad995bc81d39ec9b2b7
|
||||
Subproject commit 834e1a25e96cbe120789457960c46afdea11f5bc
|
||||
Loading…
Reference in New Issue
Block a user