void NextStep() { if (mSteps == null) { return; } if (IsDone()) { return; } if (mCurrentStep != null) { mIndex++; } if (mIndex >= mSteps.Count) { return; } mSteps[mIndex].InferType(); if (mSteps [mIndex].mType != null) { mCurrentStep = System.Activator.CreateInstance(mSteps[mIndex].mType) as IBuildStepProvider; mConfiguration.SetParams(mSteps[mIndex].mParams); } else { mCurrentStep = new EmptyBuildStep(); } mCurrentStep.BuildStepStart(mConfiguration); }
public void Clear() { mIndex = 0; mSteps = null; mConfiguration = null; mCurrentStep = null; }
public void Init(List <BuildStep> pSteps, BuildConfiguration pConfiguration) { mIndex = 0; mSteps = pSteps; mConfiguration = pConfiguration; mCurrentStep = null; }
/// <summary> /// Initializes a new instance of the <see cref="DynamicBuilder"/> class. /// </summary> /// <param name="name">The name of this instance. Used to name the created thread.</param> /// <param name="builder">The builder to use.</param> /// <param name="buildStepProvider">The build step provider to use.</param> public DynamicBuilder(Builder builder, IBuildStepProvider buildStepProvider, string name = null) { this.builder = builder; dynamicBuildStep = new DynamicBuildStep(buildStepProvider, builder.ThreadCount); builderThread = new Thread(SafeAction.Wrap(BuilderThread)) { IsBackground = true }; if (!string.IsNullOrEmpty(name)) { builderThread.Name = name; } }
public DynamicBuildStep(IBuildStepProvider buildStepProvider) { this.buildStepProvider = buildStepProvider; }
public DynamicBuildStep(IBuildStepProvider buildStepProvider, int maxParallelSteps) { this.buildStepProvider = buildStepProvider; MaxParallelSteps = maxParallelSteps; Priority = int.MinValue; // Highest priority }