public enum DesktopCloseReason Why a window's close drain (DesktopWindowOptions.CloseDrainAsync) runs.
Remarks
This set is open: a minor release may add values, so handle an unknown one as DesktopCloseReason.User.
Values
User
User = 0 The user closed the window: its close button, Alt+F4, Command and W, the window menu or the window manager.
Quit
Quit = 2 A quit (DesktopHostOptions.ConfirmQuitAsync, such as Command and Q) asked the window's close guard.
Shutdown
Shutdown = 3 The host shuts down: Ctrl+C, SIGTERM, SIGHUP, a closed Windows console, or a quit once every guard agreed. The drain ends at DesktopHostOptions.ShutdownDrainTimeout at the latest.