Example #1
0
 public void DestroyRunner()
 {
     if (myRunner != null)
     {
         myRunner.Dispose();
     }
 }
    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);
        }
    }
Example #3
0
 protected override void DestroyRunner()
 {
     if (myRunner != null)
     {
         myRunner.Unload();
         myRunner.Dispose();
     }
 }
Example #4
0
 public void DestroyRunner()
 {
     NTrace.Debug("Destroying ProcessRunner");
     if (myRunner != null)
     {
         myRunner.Dispose();
     }
 }
Example #5
0
 void ProcessExitEvent(object sender, EventArgs e)
 {
     WorkbenchSingleton.SafeThreadAsyncCall(
         delegate {
         ProcessRunner p = (ProcessRunner)sender;
         TaskService.BuildMessageViewCategory.AppendLine(StringParser.Parse("${res:XML.MainMenu.ToolMenu.ExternalTools.ExitedWithCode} " + p.ExitCode));
         p.Dispose();
     });
 }
Example #6
0
 public bool IsAvailable(ref int progressIndex, ref int failureCount)
 {
     if (_processRunner == null)
     {
         return(true);
     }
     if (!_processRunner.IsAvailable(ref progressIndex, ref failureCount))
     {
         return(false);
     }
     _processRunner.Dispose();
     _processRunner = null;
     return(true);
 }
Example #7
0
 public bool IsAvailable()
 {
     if (_processRunner == null)
     {
         return(true);
     }
     if (!_processRunner.IsAvailable())
     {
         return(false);
     }
     _processRunner.Dispose();
     _processRunner = null;
     return(true);
 }