Exemplo n.º 1
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);
 }
Exemplo n.º 2
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));
     }
 }
Exemplo n.º 3
0
 public SelectorConstructor(AttributeSelectorFactory attributeSelector,
                            PseudoClassSelectorFactory pseudoClassSelector, PseudoElementSelectorFactory pseudoElementSelector, bool preserveComments)
 {
     _combinators = new Stack <Combinator>();
     Reset(attributeSelector, pseudoClassSelector, pseudoElementSelector, preserveComments);
 }