Exemplo n.º 1
0
 public UpdateStepContext(UpdateStepBaseType step, UpdateContext updateContext)
     : base(updateContext)
 {
     Step = step;
 }
Exemplo n.º 2
0
        private IEnumerable <PreconditionType> ResolvePreconditions(UpdateStepContext stepContext, UpdateStepBaseType step,
                                                                    Updates script)
        {
            var preconditions = step.Preconditions;

            if (preconditions == null || preconditions.Length == 0)
            {
                _logger.LogInformation("{0} doesn't have precondition - using script defaults", stepContext);
                preconditions = script.DefaultPreconditions;
            }

            if (preconditions == null)
            {
                throw new InvalidOperationException($"Update script for {stepContext} doesn't have default preconditions specified");
            }

            return(preconditions);
        }