Пример #1
0
 public ReferenceStepQuery.Step.MatchType Matches(ReferenceStep otherStep)
 {
     if (this.wildcard != ReferenceStepQuery.WildcardType.None)
     {
         if (this.wildcard == ReferenceStepQuery.WildcardType.Descendant)
         {
             return(ReferenceStepQuery.Step.MatchType.ContinueMatch);
         }
         if (this.wildcard != ReferenceStepQuery.WildcardType.Indexer)
         {
             return(ReferenceStepQuery.Step.MatchType.NoMatch);
         }
         if (otherStep.GetType() != typeof(IndexedClrPropertyReferenceStep))
         {
             return(ReferenceStepQuery.Step.MatchType.NoMatch);
         }
         return(ReferenceStepQuery.Step.MatchType.YesMatch);
     }
     if (this.referenceStep == null)
     {
         if (!otherStep.Name.Contains(this.nameContains))
         {
             return(ReferenceStepQuery.Step.MatchType.NoMatch);
         }
         return(ReferenceStepQuery.Step.MatchType.YesMatch);
     }
     if (this.referenceStep.SortValue == otherStep.SortValue && this.referenceStep.GetType() == otherStep.GetType())
     {
         return(ReferenceStepQuery.Step.MatchType.YesMatch);
     }
     return(ReferenceStepQuery.Step.MatchType.NoMatch);
 }