Refactor CoreHandler

This commit is contained in:
2dust
2024-10-07 11:18:24 +08:00
parent 4ccc7aa92d
commit 7a839063d0
4 changed files with 17 additions and 21 deletions
+3 -1
View File
@@ -8,12 +8,14 @@ namespace ServiceLib.Handler
/// </summary>
public class CoreHandler
{
private static readonly Lazy<CoreHandler> _instance = new(() => new());
public static CoreHandler Instance => _instance.Value;
private Config _config;
private Process? _process;
private Process? _processPre;
private Action<bool, string> _updateFunc;
public CoreHandler(Config config, Action<bool, string> update)
public void Init(Config config, Action<bool, string> update)
{
_config = config;
_updateFunc = update;