-
Notifications
You must be signed in to change notification settings - Fork 0
/
MercuriusD.cs
39 lines (31 loc) · 1 KB
/
MercuriusD.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using Mercurius;
using Mercurius.Configuration;
using Mercurius.Profiles;
using Mercurius.DBus;
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Hosting;
using NLog;
namespace Mercurius {
public class DaemonService : IHostedService, IDisposable {
private readonly ILogger logger;
public DaemonService() {
logger = LogManager.GetCurrentClassLogger();
}
public Task StartAsync(CancellationToken cancellationToken) {
logger.Info("Starting Mercurius Daemon...");
SettingsManager.Init();
ProfileManager.InitializeDirectory();
ProfileManager.LoadAllProfiles();
return Task.CompletedTask;
}
public Task StopAsync(CancellationToken cancellationToken) {
logger.Info("Stopping daemon.");
return Task.CompletedTask;
}
public void Dispose() {
logger.Info("Disposing....");
}
}
}