public override void TraverseRecursive(VisualElement element, int depth) { int count = this.m_Matchers.Count; int count2 = this.m_Matchers.Count; for (int i = 0; i < count2; i++) { RuleMatcher ruleMatcher = this.m_Matchers[i]; StyleComplexSelector arg_51_1 = ruleMatcher.complexSelector; Action <VisualElement, MatchResultInfo> arg_51_2; if ((arg_51_2 = UQuery.UQueryMatcher.< > c.< > 9__5_0) == null) { arg_51_2 = (UQuery.UQueryMatcher.< > c.< > 9__5_0 = new Action <VisualElement, MatchResultInfo>(UQuery.UQueryMatcher.< > c.< > 9. < TraverseRecursive > b__5_0)); } bool flag = StyleSelectorHelper.MatchRightToLeft(element, arg_51_1, arg_51_2); if (flag) { bool flag2 = this.OnRuleMatchedElement(ruleMatcher, element); if (flag2) { return; } } } base.Recurse(element, depth); bool flag3 = this.m_Matchers.Count > count; if (flag3) { this.m_Matchers.RemoveRange(count, this.m_Matchers.Count - count); return; } }
public override void TraverseRecursive(VisualElement element, int depth) { int originalCount = m_Matchers.Count; int count = m_Matchers.Count; // changes while we iterate so save for (int j = 0; j < count; j++) { RuleMatcher matcher = m_Matchers[j]; if (StyleSelectorHelper.MatchRightToLeft(element, matcher.complexSelector, (e, i) => NoProcessResult(e, i))) { // use by uQuery to determine if we need to stop if (OnRuleMatchedElement(matcher, element)) { return; } } } Recurse(element, depth); // Remove all matchers that we could possibly have added at this level of recursion if (m_Matchers.Count > originalCount) { m_Matchers.RemoveRange(originalCount, m_Matchers.Count - originalCount); } }
protected override bool OnRuleMatchedElement(RuleMatcher matcher, VisualElement element) { if (match == null) { match = element; } return(true); }
protected override bool OnRuleMatchedElement(RuleMatcher matcher, VisualElement element) { if (element is T castedElement) { result.Add(callBack(castedElement)); } return(false); }
protected override bool OnRuleMatchedElement(RuleMatcher matcher, VisualElement element) { bool flag = base.match == null; if (flag) { base.match = element; } return(true); }
protected override bool OnRuleMatchedElement(RuleMatcher matcher, VisualElement element) { ++matchCount; if (matchCount == _matchIndex) { match = element; } return(matchCount >= _matchIndex); }
protected override bool OnRuleMatchedElement(RuleMatcher matcher, VisualElement element) { this.matchCount++; bool flag = this.matchCount == this._matchIndex; if (flag) { base.match = element; } return(this.matchCount >= this._matchIndex); }
protected override bool OnRuleMatchedElement(RuleMatcher matcher, VisualElement element) { T t = element as T; bool flag = t != null; if (flag) { this.result.Add(this.callBack(t)); } return(false); }
protected override bool OnRuleMatchedElement(RuleMatcher matcher, VisualElement element) { T castedElement = element as T; if (castedElement != null) { result.Add(callBack(castedElement)); } return(false); }
protected virtual bool OnRuleMatchedElement(RuleMatcher matcher, VisualElement element) { return(false); }
protected override bool OnRuleMatchedElement(RuleMatcher matcher, VisualElement element) { base.match = element; return(false); }
protected override bool OnRuleMatchedElement(RuleMatcher matcher, VisualElement element) { this.matches.Add(element as T); return(false); }