Exemplo n.º 1
0
        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// </summary>
        //////////////////////////////////////////////////////////////////////////

        private void OnComplete(object sender, RunWorkerCompletedEventArgs e)
        {
            m_BackgroundWorker = null;
            m_NAntProcess      = null;

            if (e.Cancelled)
            {
                WriteConsole(Environment.NewLine + "[NAntAddin]: Target '" + m_TargetNode["name"] + "' aborted !" + Environment.NewLine);
            }
            else
            {
                WriteConsole(Environment.NewLine + "[NAntAddin]: Target '" + m_TargetNode["name"] + "' completed." + Environment.NewLine);
            }

            // Notify listeners that the process has exited
            if (TargetCompleted != null)
            {
                TargetCompleted.Invoke(this, new EventArgs());
            }
        }
Exemplo n.º 2
0
        private void OnComplete(object sender, RunWorkerCompletedEventArgs e)
        {
            _backgroundWorker = null;
            _nAntProcess      = null;

            if (e.Cancelled)
            {
                WriteConsole(string.Format("{0}[{2}]: Target '{1}' aborted !{0}",
                                           Environment.NewLine,
                                           TargetNode["name"],
                                           AppConstants.NAntRunner));
            }
            else
            {
                WriteConsole(string.Format("{0}[{2}]: Target '{1}' completed.{0}",
                                           Environment.NewLine,
                                           TargetNode["name"],
                                           AppConstants.NAntRunner));
            }

            // Notify listeners that the process has exited
            TargetCompleted?.Invoke(this, new EventArgs());
        }