Exemple #1
0
 private void PerformSetup(IExecutionStrategy strategy, ICakeContext context)
 {
     if (_setupAction != null)
     {
         strategy.PerformSetup(_setupAction, context);
     }
 }
Exemple #2
0
        private void PerformSetup(IExecutionStrategy strategy, ICakeContext context, CakeTask targetTask,
                                  CakeTask[] tasks, Stopwatch stopWatch, CakeReport report)
        {
            stopWatch.Restart();

            PublishEvent(BeforeSetup, new BeforeSetupEventArgs(context));
#pragma warning disable 618
            PublishEvent(Setup, new SetupEventArgs(context));
#pragma warning restore 618

            try
            {
                if (_actions.Setups.Count > 0)
                {
                    foreach (var setup in _actions.Setups)
                    {
                        strategy.PerformSetup(setup, new SetupContext(context, targetTask, tasks));
                    }

                    report.Add("Setup", CakeReportEntryCategory.Setup, stopWatch.Elapsed);
                }
            }
            finally
            {
                PublishEvent(AfterSetup, new AfterSetupEventArgs(context));
            }
        }
Exemple #3
0
 private void PerformSetup(IExecutionStrategy strategy)
 {
     if (_setupAction != null)
     {
         strategy.PerformSetup(_setupAction);
     }
 }
Exemple #4
0
 private void PerformSetup(IExecutionStrategy strategy, ICakeContext context)
 {
     PublishEvent(Setup, new SetupEventArgs(context));
     if (_setupAction != null)
     {
         strategy.PerformSetup(_setupAction, context);
     }
 }
Exemple #5
0
        /// <summary>
        /// Performs the build setup action.
        /// </summary>
        /// <param name="strategy">The <see cref="IExecutionStrategy"/> use to execute the setup.</param>
        protected virtual void PerformSetup(IExecutionStrategy strategy)
        {
            if (SetupAction == null)
            {
                return;
            }

            strategy.PerformSetup(SetupAction);
        }
Exemple #6
0
        private void PerformSetup(IExecutionStrategy strategy, ICakeContext context, CakeTask targetTask, IEnumerable <CakeTask> tasks, Stopwatch stopWatch, CakeReport report)
        {
            stopWatch.Restart();

            PublishEvent(Setup, new SetupEventArgs(context));
            if (_actions.Setup != null)
            {
                strategy.PerformSetup(_actions.Setup, new SetupContext(context, targetTask, tasks));
                report.Add("**Setup**", stopWatch.Elapsed);
            }
        }
Exemple #7
0
        private void PerformSetup(IExecutionStrategy strategy, ICakeContext context, Stopwatch stopWatch, CakeReport report)
        {
            stopWatch.Restart();

            PublishEvent(Setup, new SetupEventArgs(context));
            if (_setupAction != null)
            {
                strategy.PerformSetup(_setupAction, context);
                report.Add("**Setup**", stopWatch.Elapsed);
            }
        }
Exemple #8
0
        private void PerformSetup(IExecutionStrategy strategy, ICakeContext context, CakeTask targetTask,
                                  CakeTask[] tasks, Stopwatch stopWatch, CakeReport report)
        {
            stopWatch.Restart();

            PublishEvent(Setup, new SetupEventArgs(context));

            if (_actions.Setups.Count > 0)
            {
                foreach (var setup in _actions.Setups)
                {
                    strategy.PerformSetup(setup, new SetupContext(context, targetTask, tasks));
                }

                report.Add("Setup", CakeReportEntryCategory.Setup, stopWatch.Elapsed);
            }
        }
 /// <summary>
 /// Performs the setup.
 /// </summary>
 /// <param name="action">The action.</param>
 /// <param name="context">The setup context.</param>
 public void PerformSetup(Action <ISetupContext> action, ISetupContext context)
 {
     _default.PerformSetup(action, context);
 }