コード例 #1
0
#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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
 protected override bool Equals(ExpressionEqualityComparator comparator, CallSiteHashedNode other) => comparator.Equals(Binder, other.Binder);
コード例 #4
0
 protected override bool Equals(ExpressionEqualityComparator comparator, CatchBlockHashedNode other) => comparator.Equals(CatchBlock, other.CatchBlock);
コード例 #5
0
 protected override bool Equals(ExpressionEqualityComparator comparator, SwitchCaseHashedNode other) => comparator.Equals(SwitchCase, other.SwitchCase);
コード例 #6
0
 protected override bool Equals(ExpressionEqualityComparator comparator, ElementInitHashedNode other) => comparator.Equals(Initializer, other.Initializer);
コード例 #7
0
 protected override bool Equals(ExpressionEqualityComparator comparator, MemberBindingHashedNode other) => comparator.Equals(Binding, other.Binding);
コード例 #8
0
 protected override bool Equals(ExpressionEqualityComparator comparator, ExpressionHashedNode other) => comparator.Equals(Expression, other.Expression);