TypeEqual() public static method

Creates a TypeBinaryExpression that compares run-time type identity.
public static TypeEqual ( Expression expression, Type type ) : TypeBinaryExpression
expression Expression An to set the property equal to.
type Type A to set the property equal to.
return TypeBinaryExpression
        public void TypeBinary_equal()
        {
            var expression =
                LinqExpression.TypeEqual(
                    LinqExpression.Empty(),
                    typeof(object));

            ShouldRoundrip(expression);
        }
 /// <summary>
 /// Creates a new expression that is like this one, but using the
 /// supplied children. If all of the children are the same, it will
 /// return this expression.
 /// </summary>
 /// <param name="expression">The <see cref="Expression" /> property of the result.</param>
 /// <returns>This expression if no children changed, or an expression with the updated children.</returns>
 public TypeBinaryExpression Update(Expression expression)
 {
     if (expression == Expression)
     {
         return(this);
     }
     if (NodeType == ExpressionType.TypeIs)
     {
         return(Expression.TypeIs(expression, TypeOperand));
     }
     return(Expression.TypeEqual(expression, TypeOperand));
 }
 private TypeBinaryExpression TypeBinaryExpression(
     ExpressionType nodeType, System.Type type, JObject obj)
 {
     var expression = this.Prop(obj, "expression", this.Expression);
     var typeOperand = this.Prop(obj, "typeOperand", this.Type);
     
     switch (nodeType) {
         case ExpressionType.TypeIs:
             return Expr.TypeIs(expression, typeOperand);
         case ExpressionType.TypeEqual:
             return Expr.TypeEqual(expression, typeOperand);
         default:
             throw new NotSupportedException();
     }
 }
 public void MiscellaneousExpression_TypeEqual()
 {
     ExecuteExpr(Property.Id, id => Expr.TypeEqual(id, typeof(Sensor)), ExpressionType.TypeEqual);
 }