Capture shutdown command for graceful close in .NET Core Capture shutdown command for graceful close in .NET Core windows windows