Beispiel #1
0
 /// <summary>
 /// Visits the <see cref="ConstantExpression"/>
 /// </summary>
 /// <param name="node">The expression to visit</param>
 /// <returns><paramref name="node"/></returns>
 protected override Expression VisitConstant(ConstantExpression node)
 {
     try
     {
         if (!FastEqualityComparer.Create(node.Type).Equals(PeekBasis <ConstantExpression>().Value, node.Value))
         {
             return(NotEqual(node));
         }
         return(base.VisitConstant(node));
     }
     finally
     {
         PopBasis();
     }
 }
Beispiel #2
0
 public bool Equals(ActiveConstantExpression other) => Type == other.Type && FastEqualityComparer.Get(Type).Equals(Value, other.Value) && Equals(options, other.options);