mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Added some more plugin architecture (modules are now a type of plugin)
This commit is contained in:
1 parent
84f21aa044
commit
ede07722eb
22 files changed
+122
-122
No files matched your search
@@ -5,24 +5,24 @@ namespace Artemis.Core.Services
|
||||
{
|
||||
public class CoreService : ICoreService
|
||||
{
|
||||
private readonly IModuleService _moduleService;
|
||||
private readonly IPluginService _pluginService;
|
||||
|
||||
public CoreService(IModuleService moduleService)
|
||||
public CoreService(IPluginService pluginService)
|
||||
{
|
||||
_moduleService = moduleService;
|
||||
_pluginService = pluginService;
|
||||
Task.Run(Initialize);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_moduleService.Dispose();
|
||||
_pluginService.Dispose();
|
||||
}
|
||||
|
||||
public bool IsInitialized { get; set; }
|
||||
|
||||
private async Task Initialize()
|
||||
{
|
||||
await _moduleService.LoadModules();
|
||||
await _pluginService.LoadModules();
|
||||
|
||||
IsInitialized = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user