示例#1
0
 internal void ReplaceRightMostEvaluator(Evaluator replacement)
 {
     evaluators[num - 1] = replacement;
 }
示例#2
0
 public void Add(Evaluator e)
 {
     evaluators.Add(e);
     UpdateNumEvaluators();
 }
示例#3
0
文件: Collector.cs 项目: bkzhn/dcsoup
 internal Accumulator(Element root, Elements elements, Evaluator eval)
 {
     this.root = root;
     this.elements = elements;
     this.eval = eval;
 }
示例#4
0
文件: Selector.cs 项目: bkzhn/dcsoup
 private Selector(string query, Element root)
 {
     Validate.NotNull(query);
     query = query.Trim();
     Validate.NotEmpty(query);
     Validate.NotNull(root);
     this.evaluator = QueryParser.Parse(query);
     this.root = root;
 }
示例#5
0
 public ImmediateParent(Evaluator evaluator)
 {
     this.evaluator = evaluator;
 }
示例#6
0
文件: Collector.cs 项目: bkzhn/dcsoup
 /// <summary>
 /// Build a list of elements,
 /// by visiting root and every descendant of root, and testing it against the evaluator.
 /// </summary>
 /// <param name="eval">Evaluator to test elements against</param>
 /// <param name="root">root of tree to descend</param>
 /// <returns>list of matches; empty if none</returns>
 public static Elements Collect(Evaluator eval, Element root)
 {
     Elements elements = new Elements();
     new NodeTraversor(new Collector.Accumulator(root, elements, eval)).Traverse(root);
     return elements;
 }
示例#7
0
 public Parent(Evaluator evaluator)
 {
     this.evaluator = evaluator;
 }
示例#8
0
 public Not(Evaluator evaluator)
 {
     this.evaluator = evaluator;
 }
示例#9
0
 public Has(Evaluator evaluator)
 {
     this.evaluator = evaluator;
 }
示例#10
0
 public ImmediatePreviousSibling(Evaluator evaluator)
 {
     this.evaluator = evaluator;
 }
示例#11
0
 public PreviousSibling(Evaluator evaluator)
 {
     this.evaluator = evaluator;
 }