mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Core - Ensure application data folder exists
UI - Properly catch exceptions during exception display UI - Display fatal exceptions during Core creation, even before Core initialisation
This commit is contained in:
1 parent
0ccc1fed3d
commit
d009b11e97
4 files changed
+45
-24
No files matched your search
@@ -39,7 +39,14 @@ namespace Artemis.Core.Ninject
|
||||
.Configure(c => c.When(HasAccessToProtectedService).InSingletonScope());
|
||||
});
|
||||
|
||||
Kernel.Bind<LiteRepository>().ToMethod(t => new LiteRepository(Constants.ConnectionString)).InSingletonScope();
|
||||
Kernel.Bind<LiteRepository>().ToMethod(t =>
|
||||
{
|
||||
// Ensure the data folder exists
|
||||
if (!Directory.Exists(Constants.DataFolder))
|
||||
Directory.CreateDirectory(Constants.DataFolder);
|
||||
|
||||
return new LiteRepository(Constants.ConnectionString);
|
||||
}).InSingletonScope();
|
||||
|
||||
// Bind all repositories as singletons
|
||||
Kernel.Bind(x =>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Artemis.Core.Events;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Core.RGB.NET;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
|
||||
Reference in new issue
Block a user