Esempio n. 1
0
 static void RaiseShutdownEvent(ShutdownEventArgs args) {
     Shutdown?.Invoke(args);
 }
Esempio n. 2
0
 static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
     var args = new ShutdownEventArgs(e.ExceptionObject as Exception);
     RaiseShutdownEvent(args);
 }
Esempio n. 3
0
 static bool Kernel32_ProcessShuttingDown(ShutdownReason sig) {
     ShutdownEventArgs args = new ShutdownEventArgs(sig);
     RaiseShutdownEvent(args);
     return false;
 }
Esempio n. 4
0
 static void CurrentDomain_ProcessExit(object sender, EventArgs e) {
     var args = new ShutdownEventArgs(ShutdownReason.ReachEndOfMain);
     RaiseShutdownEvent(args);
 }
Esempio n. 5
0
 static void RaiseShutdownEvent(ShutdownEventArgs args)
 {
     Shutdown?.Invoke(args);
 }
Esempio n. 6
0
        static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            var args = new ShutdownEventArgs(e.ExceptionObject as Exception);

            RaiseShutdownEvent(args);
        }
Esempio n. 7
0
        static void CurrentDomain_ProcessExit(object sender, EventArgs e)
        {
            var args = new ShutdownEventArgs(ShutdownReason.ReachEndOfMain);

            RaiseShutdownEvent(args);
        }
Esempio n. 8
0
 static void RaiseShutdownEvent(ShutdownEventArgs args)
 {
     if (null != Shutdown)
         Shutdown(args);
 }