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