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); }
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)); }
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)); }
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)); }
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)); }
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)); }