private static void Execute([NotNull] PipelineStartInfo info)
        {
            using (new ProfileSection("Execute pipeline processors"))
            {
                ProfileSection.Argument("info", info);

                try
                {
                    if (info.PipelineController != null)
                    {
                        info.PipelineController.Maximum = ProcessorManager.GetProcessorsCount(info.ProcessorArgs, info._Steps);
                    }

                    bool result = ExecuteSteps(info.ProcessorArgs, info._Steps, info.PipelineController);

                    if (info.PipelineController != null)
                    {
                        info.PipelineController.Finish("Done.", result);
                    }

                    if (result)
                    {
                        info.ProcessorArgs.FireOnCompleted();
                        info.ProcessorArgs.Dispose();
                    }
                }
                catch (Exception ex)
                {
                    Log.Warn(ex, "An error occurred during executing a pipeline");
                    info.ProcessorArgs.Dispose();
                }
            }
        }
        public void Start()
        {
            using (new ProfileSection("Start pipeline", this))
            {
                if (Controller != null)
                {
                    Controller.Start(ReplaceVariables(Title, ProcessorArgs), _Steps);
                }

                Assert.IsTrue(_Thread == null || !_Thread.IsAlive, "The previous thread didn't complete its job");

                var pipelineStartInfo = new PipelineStartInfo(ProcessorArgs, _Steps, Controller);
                if (IsAsync)
                {
                    _Thread = new Thread(Execute);
                    _Thread.SetApartmentState(ApartmentState.STA);

                    // Calls the Execute method in thread
                    _Thread.Start(pipelineStartInfo);
                    return;
                }

                Execute(pipelineStartInfo);
            }
        }
        public void Start()
        {
            using (new ProfileSection("Start pipeline", this))
              {
            if (this.controller != null)
            {
              this.controller.Start(ReplaceVariables(this.title, this.processorArgs), this.steps);
            }

            Assert.IsTrue(this.thread == null || !this.thread.IsAlive, "The previous thread didn't complete its job");

            var pipelineStartInfo = new PipelineStartInfo(this.processorArgs, this.steps, this.controller);
            if (this.isAsync)
            {
              this.thread = new Thread(Execute);
              this.thread.SetApartmentState(ApartmentState.STA);

              // Calls the Execute method in thread
              this.thread.Start(pipelineStartInfo);
              return;
            }

            Execute(pipelineStartInfo);
              }
        }