Esempio n. 1
0
        public void Run(object solutionObject)
        {
            Solution solution = solutionObject as Solution;

            if (solution == null)
            {
                return;
            }

            try
            {
                _solutionLevelCommand.Execute(solution);
            }
            catch (Exception exception)
            {
                MessageBoxHelper.Information(
                    string.Format(
                        "The command '{0}' failed with the exception '{1}'. See Visual Studio Output Window for Details.",
                        _solutionLevelCommand.GetCommandName(),
                        exception.Message));
                OutputWindowHandler.WriteMessage(exception.ToString());
            }

            ThreadDone?.Invoke(this, EventArgs.Empty);
        }
Esempio n. 2
0
        public ReaderToWriterThread(ThreadDone callback, TextReader reader, TextWriter writer, Int32 bufferSize)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }

            this.callback   = callback;
            this.reader     = reader;
            this.writer     = writer;
            this.bufferSize = bufferSize;
        }
Esempio n. 3
0
 public ReaderToWriterThread(ThreadDone callback, TextReader reader, TextWriter writer)
     : this(callback, reader, writer, DefaultBufferSize)
 {
 }
        public void Run()
        {
            string result = RunExternalExe(ExeName, Arguments);

            ThreadDone?.Invoke(this, new OutputEventArgs(result));
        }
 public void Run()
 {
     run();
     ThreadDone?.Invoke(this, EventArgs.Empty);
 }