Exemple #1
0
 public Accumulator(DomElement root,
                    DomQuery elements,
                    Evaluator eval)
 {
     this.root = root;
     this.elements = elements;
     this.eval = eval;
 }
        public CssSelector(string query, DomElement root)
        {
            if (query == null)
                throw new ArgumentNullException("query");

            query = query.Trim();
            if (query.Length == 0)
                throw Failure.AllWhitespace("query");

            if (root == null)
                throw new ArgumentNullException("root");

            this.evaluator = QueryParser.Parse(query);
            this.root = root;
        }
Exemple #3
0
 public static DomQuery Collect(Evaluator eval, DomElement root)
 {
     DomQuery elements = new DomQuery();
     new NodeTraversor(new Accumulator(root, elements, eval)).Traverse(root);
     return elements;
 }
 public void Add(Evaluator e)
 {
     evaluators.Add(e);
 }
 internal void ReplaceRightMostEvaluator(Evaluator replacement)
 {
     evaluators[evaluators.Count - 1] = replacement;
 }
 protected StructuralEvaluator(Evaluator evaluator)
 {
     this.evaluator = evaluator;
 }
 public Has(Evaluator evaluator)
     : base(evaluator)
 {
 }
 public PreviousSibling(Evaluator evaluator)
     : base(evaluator)
 {
 }
 public Parent(Evaluator evaluator)
     : base(evaluator)
 {
 }
 public Not(Evaluator evaluator)
     : base(evaluator)
 {
 }
 public ImmediatePreviousSibling(Evaluator evaluator)
     : base(evaluator)
 {
 }
 public ImmediateParent(Evaluator evaluator)
     : base(evaluator)
 {
 }