mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Added some module architecture
This commit is contained in:
1 parent
8d9076a241
commit
84f21aa044
25 files changed
+1732
-59
No files matched your search
@@ -1,8 +1,30 @@
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
|
||||
namespace Artemis.Core.Services
|
||||
{
|
||||
public class CoreService : ICoreService
|
||||
{
|
||||
private readonly IModuleService _moduleService;
|
||||
|
||||
public CoreService(IModuleService moduleService)
|
||||
{
|
||||
_moduleService = moduleService;
|
||||
Task.Run(Initialize);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_moduleService.Dispose();
|
||||
}
|
||||
|
||||
public bool IsInitialized { get; set; }
|
||||
|
||||
private async Task Initialize()
|
||||
{
|
||||
await _moduleService.LoadModules();
|
||||
|
||||
IsInitialized = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user