Update
This commit is contained in:
ALEXTANG
2023-07-13 18:20:39 +08:00
parent bff8f20af3
commit fbb26ea9ea
4 changed files with 38 additions and 11 deletions

View File

@@ -5,6 +5,10 @@ namespace TEngine
{
static Log()
{
if (LogCore.Instance == null)
{
LogCore.TempInstance = new LogCore();
}
LogCore.Instance.ILog = new NLog("Server");
}

View File

@@ -17,6 +17,26 @@ namespace TEngine.Core
AssemblyManager.OnUnLoadAssemblyEvent += OnUnLoad;
}
/// <summary>
/// 特殊情况调用设置。
/// </summary>
public static T TempInstance
{
get
{
return Instance;
}
set
{
if (Instance != null)
{
return;
}
Instance = value;
}
}
public virtual Task Initialize()
{
return Task.CompletedTask;