Beispiel #1
0
 public static SelectorConstructor NewSelectorConstructor(AttributeSelectorFactory attributeSelector,
                                                          PseudoClassSelectorFactory pseudoClassSelector, PseudoElementSelectorFactory pseudoElementSelector)
 {
     lock (Lock)
     {
         return(Selector.Count == 0
             ? new SelectorConstructor(attributeSelector, pseudoClassSelector, pseudoElementSelector)
             : Selector.Pop().Reset(attributeSelector, pseudoClassSelector, pseudoElementSelector));
     }
 }
Beispiel #2
0
 public SelectorConstructor Reset(AttributeSelectorFactory attributeSelector,
                                  PseudoClassSelectorFactory pseudoClassSelector, PseudoElementSelectorFactory pseudoElementSelector)
 {
     _attrName  = null;
     _attrValue = null;
     _attrNs    = null;
     _attrOp    = string.Empty;
     _state     = State.Data;
     _combinators.Clear();
     _temp                  = null;
     _group                 = null;
     _complex               = null;
     _valid                 = true;
     IsNested               = false;
     _ready                 = true;
     _attributeSelector     = attributeSelector;
     _pseudoClassSelector   = pseudoClassSelector;
     _pseudoElementSelector = pseudoElementSelector;
     return(this);
 }
Beispiel #3
0
 public SelectorConstructor(AttributeSelectorFactory attributeSelector,
                            PseudoClassSelectorFactory pseudoClassSelector, PseudoElementSelectorFactory pseudoElementSelector)
 {
     _combinators = new Stack <Combinator>();
     Reset(attributeSelector, pseudoClassSelector, pseudoElementSelector);
 }