mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-28 16:14:58 +03:00
Refactor NoticeHandler
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using Splat;
|
||||
|
||||
namespace ServiceLib.Handler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public sealed class AppHandler
|
||||
{
|
||||
@@ -33,7 +31,7 @@ namespace ServiceLib.Handler
|
||||
#region Init
|
||||
|
||||
public AppHandler()
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
public bool InitApp()
|
||||
@@ -42,7 +40,6 @@ namespace ServiceLib.Handler
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Locator.CurrentMutable.RegisterLazySingleton(() => new NoticeHandler(), typeof(NoticeHandler));
|
||||
Thread.CurrentThread.CurrentUICulture = new(_config.uiItem.currentLanguage);
|
||||
|
||||
//Under Win10
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using ServiceLib.Services.CoreConfig;
|
||||
|
||||
namespace ServiceLib.Handler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
/// <summary>
|
||||
/// Core configuration file processing class
|
||||
|
||||
@@ -4,6 +4,9 @@ namespace ServiceLib.Handler
|
||||
{
|
||||
public class NoticeHandler
|
||||
{
|
||||
private static readonly Lazy<NoticeHandler> _instance = new(() => new());
|
||||
public static NoticeHandler Instance => _instance.Value;
|
||||
|
||||
public void Enqueue(string? content)
|
||||
{
|
||||
if (content.IsNullOrEmpty())
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using ServiceLib.Services.Statistics;
|
||||
|
||||
namespace ServiceLib.Handler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public class StatisticsHandler
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using ServiceLib.Services;
|
||||
|
||||
namespace ServiceLib.Handler
|
||||
namespace ServiceLib.Handler
|
||||
{
|
||||
public class TaskHandler
|
||||
{
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace ServiceLib.Handler
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveLog(result.Description);
|
||||
SaveLog(result.Description);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user