AppDomain.CurrentDomain.ProcessExit += delegate(object sender, EventArgs eventArgs)
{
GlobalState.CancellationRequested = true;
LogService.EzLogger.LogInfoAsync("[PROCESSOR] Shutting down gracefully", null);
Console.WriteLine("Shutting down...");
Thread.Sleep(TimeSpan.FromSeconds(30));
Console.WriteLine("Finished shutting down...");
};
AppDomain.CurrentDomain.ProcessExit += delegate(object sender, EventArgs eventArgs)
{
GlobalState.CancellationRequested = true;
LogService.EzLogger.LogInfoAsync("[PROCESSOR] Shutting down gracefully", null);
Console.WriteLine("Shutting down...");
Thread.Sleep(TimeSpan.FromSeconds(30));
Console.WriteLine("Finished shutting down...");
};