コード例 #1
0
        public override bool Translate(KeySegment segment)
        {
            if (GetNextSegment() is KeySegment keySegment && keySegment.EdmType == segment.EdmType && keySegment.NavigationSource == segment.NavigationSource)
            {
                return(EnumerableComparer.Compare(keySegment.Keys, segment.Keys, KeyCompare));
            }

            return(false);
        }
コード例 #2
0
        private bool CompareAggregate(AggregateTransformationNode?node1, AggregateTransformationNode?node2)
        {
            if (node1 == node2)
            {
                return(true);
            }
            if (node1 == null || node2 == null)
            {
                return(false);
            }

            return(EnumerableComparer.Compare(node1.AggregateExpressions, node2.AggregateExpressions, CompareAggregate));
        }
コード例 #3
0
        private bool CompareComputeTransformation(ComputeTransformationNode?node1, ComputeTransformationNode?node2)
        {
            if (node1 == node2)
            {
                return(true);
            }
            if (node1 == null || node2 == null)
            {
                return(false);
            }

            return(EnumerableComparer.Compare(node1.Expressions, node2.Expressions, CompareComputeExpression));
        }
コード例 #4
0
        private bool CompareCompute(ComputeClause clause1, ComputeClause clause2)
        {
            if (clause1 == clause2)
            {
                return(true);
            }
            if (clause1 == null || clause2 == null)
            {
                return(false);
            }

            return(EnumerableComparer.Compare(clause1.ComputedItems, clause2.ComputedItems, CompareComputeExpression));
        }
コード例 #5
0
        private bool CompareApply(ApplyClause clause1, ApplyClause clause2)
        {
            if (clause1 == clause2)
            {
                return(true);
            }
            if (clause1 == null || clause2 == null)
            {
                return(false);
            }

            return(EnumerableComparer.Compare(clause1.Transformations, clause2.Transformations, CompareTransformation));
        }
コード例 #6
0
 private bool CompareAggregate(EntitySetAggregateExpression expression1, EntitySetAggregateExpression expression2)
 {
     return(expression1.Alias == expression2.Alias &&
            _queryNodeComparer.Compare(expression1.Expression, expression2.Expression) &&
            EnumerableComparer.Compare(expression1.Children, expression2.Children, CompareAggregate));
 }