static void Main(string[] args) { LogHelper.InitLogPath(); LogHelper.AddLog("Instance is starting."); var list = HardwareHelper.GetCpuId(); list.ForEach(Console.WriteLine); var disks = HardwareHelper.GetRemovableDisk(); disks.ForEach(Console.WriteLine); AppDomain.CurrentDomain.ProcessExit += (sender, eventArgs) => { _instanceMutex?.ReleaseMutex(); _instanceMutex = null; LogHelper.AddLog("Instance is shutting down."); }; CheckSingleInstance(); AddThreadExceptionHandler(); GlobalConfig.Instance.Init(); Run(); }
public void GetCpuId() { var code = HardwareHelper.GetCpuId(); }