Exemplo n.º 1
0
 /// <summary>
 /// Visits and handles the effect.
 /// </summary>
 /// <param name="effect">Effect.</param>
 public void Visit(WhenEffect effect)
 {
     if (EvaluationManager.Evaluate(effect.Expression, Substitution, State))
     {
         foreach (var localEffect in effect.Effects)
         {
             localEffect.Accept(this);
         }
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Checks the equality of objects.
        /// </summary>
        /// <param name="obj">Object to be checked.</param>
        /// <returns>True if the objects are equal, false otherwise.</returns>
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }

            WhenEffect other = obj as WhenEffect;

            if (other == null)
            {
                return(false);
            }

            return(Expression.Equals(other.Expression) &&
                   CollectionsEquality.Equals(Effects, other.Effects));
        }
 /// <summary>
 /// Visits and handles the effect.
 /// </summary>
 /// <param name="effect">Effect.</param>
 public void Visit(WhenEffect effect)
 {
     effect.Effects.ForEach(localEffect => localEffect.Accept(this));
 }
 /// <summary>
 /// Visits and handles the effect.
 /// </summary>
 /// <param name="effect">Effect.</param>
 public void Visit(WhenEffect effect)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 /// Visits and handles the effect.
 /// </summary>
 /// <param name="effect">Effect.</param>
 public void Visit(WhenEffect effect)
 {
     WhenEffects.Add(effect);
 }