private void Insert(Combinator combinator) { _hasCombinator = true; if (combinator != Combinator.Descendent) { _combinator = combinator; } }
public void AppendSelector(ISelector selector, Combinator combinator) { if (!IsReady) { _selectors.Add(new CombinatorSelector { Selector = combinator.Change(selector), //Transform = combinator.Transform, Delimiter = combinator.Delimiter }); } }
internal SelectorFactory ResetFactory() { _attributeName = null; _attributeValue = null; _attributeOperator = string.Empty; _selectorOperation = SelectorOperation.Data; _combinator = Combinator.Descendent; _hasCombinator = false; _currentSelector = null; _aggregateSelectorList = null; _complexSelector = null; return(this); }
private void Insert(BaseSelector selector) { if (_currentSelector != null) { if (!_hasCombinator) { var compound = _currentSelector as AggregateSelectorList; if (compound == null) { compound = new AggregateSelectorList(""); compound.AppendSelector(_currentSelector); } compound.AppendSelector(selector); _currentSelector = compound; } else { if (_complexSelector == null) { _complexSelector = new ComplexSelector(); } _complexSelector.AppendSelector(_currentSelector, _combinator); _combinator = Combinator.Descendent; _hasCombinator = false; _currentSelector = selector; } } else { if (_currentSelector == null && _complexSelector == null && _combinator == Combinator.Namespace) { _complexSelector = new ComplexSelector(); _complexSelector.AppendSelector(SimpleSelector.Type(""), _combinator); _currentSelector = selector; } else { _combinator = Combinator.Descendent; _hasCombinator = false; _currentSelector = selector; } } }
public ComplexSelector AppendSelector(BaseSelector selector, Combinator combinator) { _selectors.Add(new CombinatorSelector(selector, combinator)); return(this); }
private void Insert(Combinator combinator) { _combinators.Push(combinator); }
public CombinatorSelector(BaseSelector selector, Combinator delimiter) { Selector = selector; Delimiter = delimiter; }