#pragma warning restore CA1825 public static void RoundTripAndTouchBothDomains <T>(Expression <Func <T> > q) { var cmp = new ExpressionEqualityComparator(); var qr = RoundTripAndTouchQueryable(q.Body); Assert.IsTrue(cmp.Equals(q.Body, qr)); var e = ConvertToEnumerable(q); var er = RoundTripAndTouchEnumerable(e); Assert.IsTrue(cmp.Equals(e, er)); }
public void FuncletExpression_Basics3() { var c = Expression.Constant("bar"); var f = FuncletExpression.Create <string>(c); var r = new NoOpVisitor().Visit(f); var eq = new ExpressionEqualityComparator(); Assert.IsTrue(eq.Equals(Expression.Constant("bar"), r)); }
protected override bool Equals(ExpressionEqualityComparator comparator, CallSiteHashedNode other) => comparator.Equals(Binder, other.Binder);
protected override bool Equals(ExpressionEqualityComparator comparator, CatchBlockHashedNode other) => comparator.Equals(CatchBlock, other.CatchBlock);
protected override bool Equals(ExpressionEqualityComparator comparator, SwitchCaseHashedNode other) => comparator.Equals(SwitchCase, other.SwitchCase);
protected override bool Equals(ExpressionEqualityComparator comparator, ElementInitHashedNode other) => comparator.Equals(Initializer, other.Initializer);
protected override bool Equals(ExpressionEqualityComparator comparator, MemberBindingHashedNode other) => comparator.Equals(Binding, other.Binding);
protected override bool Equals(ExpressionEqualityComparator comparator, ExpressionHashedNode other) => comparator.Equals(Expression, other.Expression);