initial
This commit is contained in:
35
LiamM42WebApi/ModuleInitializer.cs
Normal file
35
LiamM42WebApi/ModuleInitializer.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Reflection;
|
||||
|
||||
using C4IT.Logging;
|
||||
using static C4IT.Logging.cLogManager;
|
||||
|
||||
namespace C4IT.LIAM
|
||||
{
|
||||
public static class ModuleInitializer
|
||||
{
|
||||
public static bool IsInitialized { get; private set; } = false;
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (IsInitialized)
|
||||
return;
|
||||
|
||||
var Ass = Assembly.GetExecutingAssembly();
|
||||
var LM = cLogManagerFile.CreateInstance(LocalMachine: true, A: Ass);
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
cLogManager.DefaultLogger.LogAssemblyInfo(Ass);
|
||||
IsInitialized = true;
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
catch { };
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user