public override void Invoke(LineContext context) { base.Invoke(context); var variable = context.Progress.Variables[Variable]; if (variable.Equals(Value)) { context.MoveTo(Target); } }
public override void Invoke(LineContext context) { base.Invoke(context); var variable = context.Progress.Variables[Variable]; GlobalLineId target; Targets.TryGetValue(variable.Value, out target); if (target == null && !AllowFallthrough) { throw new InvalidOperationException($"GoTo Switch ({Id}) branch for variable {Variable} value ({variable.Value} not found!)"); } if (target != null) { context.MoveTo(target); } else { context.MoveToNextLine(); } }
public void Select(EntityId choiceId, LineContext context) { var selectedChoice = Choices.FirstOrDefault(c => c.Id == choiceId); if (selectedChoice == null) { throw new ArgumentException($"Choice with id = {choiceId} not found in line {Id}"); } if (VariableId != null && selectedChoice.VariableValue != null) { context.Progress.Variables[VariableId].Value = selectedChoice.VariableValue; } if (selectedChoice.TargetGoto != null) { context.MoveTo(selectedChoice.TargetGoto.Target); } else { context.MoveToNextLine(); } }
public virtual void Invoke(LineContext context) { context.Skip = false; }
public override void Invoke(LineContext context) { context.Skip = true; }
public override void Invoke(LineContext context) { base.Invoke(context); context.MoveTo(Target); }