public DeploymentStep(string name, StepCondition condition, bool requiresPackagesToBeAcquired, StepStartTrigger startTrigger, IReadOnlyDictionary <string, PropertyValue> properties, IEnumerable <DeploymentAction> actions)
 {
     Name      = name;
     Condition = condition;
     RequiresPackagesToBeAcquired = requiresPackagesToBeAcquired;
     StartTrigger = startTrigger;
     Properties   = properties;
     Actions      = actions.ToArray();
 }
Example #2
0
    //private bool ViewIsScreenOrDialog( ViewBase view )
    //{
    //    return true;
    //    //return view.ViewType == ViewType.Dialog || view.ViewType == ViewType.Screen||view.ViewType==ViewType.ChildComponent;
    //}

    private void ProcessScenarioStep(Type key, IView view, StepCondition condition)
    {
        var step = _currentScenarioSteps[key].Current;

        if (step == null)
        {
            // добавлена эта проверка для вот какого кейса:
            // если у нас работают 2 сценария одновременно, в одном нету елдов, другой сценарий ждет евенты и когда он их получает,
            // евенты вынуждают проверять текущий стип у всех сценариев, в сценарии где нету елдов стип будет нуллом, отсюда нуллреф
            return;
        }
        var stepAffectCondition = new StepAffectCondition(condition, view == null?null: view.GetType());

        if (step.IsStepAffected(stepAffectCondition))
        {
            step.SetViewForCondition(stepAffectCondition, view);
            MoveNextStep(key);
        }
    }
Example #3
0
 public void AddCondition(IConnector connector, StepCondition condition, int operand)
 {
     Steps.Add(new ConditionalStep(connector, condition, operand));
 }
Example #4
0
 public ConditionalStep(IConnector connector, StepCondition @operator, int operand)
 {
     this.Connector = connector;
     this.@operator = @operator;
     this.operand   = operand;
 }
Example #5
0
 /// <summary>
 /// Creates a ConditionalStep
 /// </summary>
 /// <param name="condition">The condition under which the step appears</param>
 /// <param name="step">The step that appears if the condition is true</param>
 public ConditionalStep(StepCondition condition, 
     IStep step)
 {
     this.condition = condition;
     this.underlyingStep = step;
 }
Example #6
0
 /// <summary>
 /// Creates a ConditionalStep
 /// </summary>
 /// <param name="condition">The condition under which the step appears</param>
 /// <param name="step">The step that appears if the condition is true</param>
 public ConditionalStep(StepCondition condition,
                        IStep step)
 {
     this.condition      = condition;
     this.underlyingStep = step;
 }