mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Added most of the settings code, doesn't work because SQLite is weird
This commit is contained in:
1 parent
231e5e7517
commit
ac577e87cc
42 files changed
+409
-582
No files matched your search
@@ -1,4 +1,6 @@
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.Storage.Repositories;
|
||||
using Ninject.Extensions.Conventions;
|
||||
using Ninject.Modules;
|
||||
|
||||
@@ -17,6 +19,18 @@ namespace Artemis.Core.Ninject
|
||||
.BindAllInterfaces()
|
||||
.Configure(c => c.InSingletonScope());
|
||||
});
|
||||
|
||||
// Bind all repositories as singletons
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
x.FromAssemblyContaining<IRepository>()
|
||||
.SelectAllClasses()
|
||||
.InheritedFrom<IRepository>()
|
||||
.BindAllInterfaces()
|
||||
.Configure(c => c.InSingletonScope());
|
||||
});
|
||||
|
||||
Kernel.Bind<PluginSettings>().ToProvider<PluginSettingsProvider>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user