示例#1
0
 private void PerformSetup(IExecutionStrategy strategy, ICakeContext context)
 {
     if (_setupAction != null)
     {
         strategy.PerformSetup(_setupAction, context);
     }
 }
示例#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));
            }
        }
示例#3
0
 private void PerformSetup(IExecutionStrategy strategy)
 {
     if (_setupAction != null)
     {
         strategy.PerformSetup(_setupAction);
     }
 }
示例#4
0
 private void PerformSetup(IExecutionStrategy strategy, ICakeContext context)
 {
     PublishEvent(Setup, new SetupEventArgs(context));
     if (_setupAction != null)
     {
         strategy.PerformSetup(_setupAction, context);
     }
 }
示例#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);
        }
示例#6
0
文件: CakeEngine.cs 项目: allenk/cake
        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);
            }
        }
示例#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);
            }
        }
示例#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);
 }