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 { };
        }
    }
}
