예제 #1
0
        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);
        }
예제 #2
0
 public void Clear()
 {
     mIndex         = 0;
     mSteps         = null;
     mConfiguration = null;
     mCurrentStep   = null;
 }
예제 #3
0
 public void Init(List <BuildStep> pSteps, BuildConfiguration pConfiguration)
 {
     mIndex         = 0;
     mSteps         = pSteps;
     mConfiguration = pConfiguration;
     mCurrentStep   = null;
 }
예제 #4
0
 /// <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;
     }
 }
예제 #5
0
 /// <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;
     }
 }
예제 #6
0
 public DynamicBuildStep(IBuildStepProvider buildStepProvider)
 {
     this.buildStepProvider = buildStepProvider;
 }
예제 #7
0
 public DynamicBuildStep(IBuildStepProvider buildStepProvider, int maxParallelSteps)
 {
     this.buildStepProvider = buildStepProvider;
     MaxParallelSteps       = maxParallelSteps;
     Priority = int.MinValue; // Highest priority
 }
예제 #8
0
 public DynamicBuildStep(IBuildStepProvider buildStepProvider, int maxParallelSteps)
 {
     this.buildStepProvider = buildStepProvider;
     MaxParallelSteps = maxParallelSteps;
     Priority = int.MinValue; // Highest priority
 }