protected virtual void OnProcessExit(object sender, ProcessExitedEventArgs args)
    {
        try
        {
            Console.Write(ConsoleOutput);
            _iExitCode = args.ExitCode;

            _bIsRunning  = false;
            _bIsComplete = true;

            //Some commands actually fail to succeed
            //if(args.ExitCode != 0)
            //{
            //    DispatchException(new Exception("Command Failed: " + this.GetType().Name + "\nConsole: " + ConsoleOutput + "\nConsoleError: " + ErrorOutput));
            //}

            OnInternalCommandComplete(_iExitCode);

            if (_objCurrentProcessRunner != null)
            {
                _objCurrentProcessRunner.Dispose();
                _objCurrentProcessRunner = null;
            }
        }
        catch (Exception objEx)
        {
            DispatchException(objEx);
        }
    }
Beispiel #2
0
 private void OnProcessExited(object sender, ProcessExitedEventArgs e)
 {
     switch (e.ExitCode)
     {
     case 1:
         // Invalid passphrase
         RequestPassphrase(false);
         break;
     }
 }
Beispiel #3
0
 private void OnProcessExited(object sender, ProcessExitedEventArgs e)
 {
     try
     {
         Send(new AD7ProgramDestroyEvent((uint)e.ExitCode), AD7ProgramDestroyEvent.IID, null);
     }
     catch (InvalidOperationException)
     {
         // we can race at shutdown and deliver the event after the debugger is shutting down.
     }
 }
Beispiel #4
0
            } // end CreateProcess()

            public int ExitProcess(uint ExitCode)
            {
                try
                {
                    var eventArgs = new ProcessExitedEventArgs(m_debugger, ExitCode);
                    int retVal    = _RaiseEvent(m_debugger.ProcessExited, eventArgs);
                    if (_ShouldOutput(retVal, eventArgs))
                    {
                        _PsPipe.WriteObject(eventArgs);
                    }
                    return(retVal);
                }
                catch (Exception e)
                {
                    Util.FailFast("Unexpected exception during event callback.", e);
                    return(0);
                }
            } // end ExitProcess()
 private void OnProcessExited(object sender, ProcessExitedEventArgs e)
 {
     _serviceProvider.GetUIThread().InvokeAsync(async() => {
         await DetachProcessAsync((PythonProcess)sender);
     }).HandleAllExceptions(_serviceProvider, GetType()).DoNotWait();
 }
Beispiel #6
0
 private void OnProcessExited(object sender, ProcessExitedEventArgs e)
 {
     try {
         Send(new AD7ProgramDestroyEvent((uint)e.ExitCode), AD7ProgramDestroyEvent.IID, null);
     } catch (InvalidOperationException) {
         // we can race at shutdown and deliver the event after the debugger is shutting down.
     }
 }
 private void OnProcessExited(object sender, ProcessExitedEventArgs e)
 {
     DetachProcess((PythonProcess)sender);
 }
Beispiel #8
0
 private void InterfaceOnExited(object sender, ProcessExitedEventArgs e)
 {
     Exited?.Invoke(this, e);
 }
Beispiel #9
0
 private void Debugger_ProcessExited(object sender, ProcessExitedEventArgs e)
 {
     UI.InvokeAsync(() => {
         _log.Add(new EventLogItem <TargetProcess>(EventLogItemType.ProcessExit, DateTime.Now, e.Process));
     });
 }
 private void OnProcessExited(object sender, ProcessExitedEventArgs e)
 {
     _serviceProvider.GetUIThread().InvokeAsync(() => {
         DetachProcess((PythonProcess)sender);
     }).DoNotWait();
 }
Beispiel #11
0
 private void Debugger_ProcessExited(object sender, ProcessExitedEventArgs e)
 {
     UI.InvokeAsync(() => {
         _processes.Remove(_processes.First(p => p.ProcessId == e.Process.PID));
     });
 }
Beispiel #12
0
 private void OnProcessExited(object sender, ProcessExitedEventArgs e)
 {
     Send(new AD7ProgramDestroyEvent((uint)e.ExitCode), AD7ProgramDestroyEvent.IID, null);
 }
Beispiel #13
0
 private void OnProcessExited(object sender, ProcessExitedEventArgs e) {
     try {
         _processExitedEvent.Set();
         lock (_syncLock) {
             _processLoaded = false;
             _processLoadedRunning = false;
             Send(new AD7ProgramDestroyEvent((uint)e.ExitCode), AD7ProgramDestroyEvent.IID, null);
         }
     } catch (InvalidOperationException) {
         // we can race at shutdown and deliver the event after the debugger is shutting down.
     }
 }
 override protected void OnProcessExit(object sender, ProcessExitedEventArgs args)
 {
     _bIsConverting = false;
     base.OnProcessExit(sender, args);
 }