Get() public method

public Get ( int index ) : BuildStep
index int
return BuildStep
Esempio n. 1
0
        private void VisualizeBuild()
        {
            for (int i = 0; i < m_oBuilder.Count; i++)
            {
                BuildStep oStep = m_oBuilder.Get(i);

                ListViewItem lvwItem = lvwBuildSteps.Items.Add(oStep.Name);

                lvwItem.SubItems.Add("");
            }
        }
Esempio n. 2
0
        public void Run()
        {
            for (int i = 0; i < m_oBuilder.Count; i++)
            {
                if (m_oBuilder.RunAllSteps ||
                    (i >= m_oBuilder.StepStart && i <= m_oBuilder.StepEnd))
                {
                    BuildStep oStep = m_oBuilder.Get(i);

                    if (StepStarted != null)
                    {
                        StepStarted(i);
                    }

                    try
                    {
                        oStep.Run();
                    }
                    catch (Exception e)
                    {
                        if (StepError != null)
                        {
                            StepError(i, e.Message);
                        }

                        break;
                    }

                    if (StepCompleted != null)
                    {
                        StepCompleted(i);
                    }
                }

                if (m_EventStop.WaitOne(1))
                {
                    break;
                }
            }

            // Make synchronous call to main form
            // to inform it that thread finished
            if (ThreadFinished != null)
            {
                ThreadFinished();
            }


            // Reset the event
            m_EventStopped.Set();
        }