public ResultInstruction(IQueryNode node, EvalHandler eval, object payload, bool exclude) { this.node = node; this.eval = eval; this.payload = payload; this.exclude = exclude; }
public OperandInstruction(IQueryNode node, EvalHandler eval, object payload, bool not) { leftInstruction = BuildInstruction(node.children[0], eval, payload, not); rightInstruction = BuildInstruction(node.children[1], eval, payload, not); this.eval = eval; this.payload = payload; }
internal static Instruction BuildInstruction(IQueryNode node, EvalHandler eval, object payload, bool not) { switch (node.type) { case QueryNodeType.And: { Assert.IsFalse(node.leaf, "And node cannot be leaf."); if (!not) { return(new AndInstruction(node, eval, payload, not)); } else { return(new OrInstruction(node, eval, payload, not)); } } case QueryNodeType.Or: { Assert.IsFalse(node.leaf, "Or node cannot be leaf."); if (!not) { return(new OrInstruction(node, eval, payload, not)); } else { return(new AndInstruction(node, eval, payload, not)); } } case QueryNodeType.Not: { Assert.IsFalse(node.leaf, "Not node cannot be leaf."); Instruction instruction = BuildInstruction(node.children[0], eval, payload, !not); return(instruction); } case QueryNodeType.Filter: case QueryNodeType.Search: { Assert.IsNotNull(node); return(new ResultInstruction(node, eval, payload, not)); } case QueryNodeType.Where: { Assert.IsFalse(node.leaf, "Where node cannot be leaf."); return(BuildInstruction(node.children[0], eval, payload, not)); } } return(null); }
public OrInstruction(IQueryNode node, EvalHandler eval, object payload, bool not) : base(node, eval, payload, not) { combine = Combine.Union; }
public AndInstruction(IQueryNode node, EvalHandler eval, object dataSet, bool not) : base(node, eval, dataSet, not) { combine = Combine.Intersection; }
public SearchIndexerQuery(QueryGraph graph, EvalHandler handler) : base(graph, handler) { }
public SearchQueryEvaluator(QueryGraph graph, EvalHandler handler) { this.graph = graph; graph.Optimize(true, true); m_Handler = handler; }
public FindFilesQuery(QueryGraph graph, EvalHandler handler) : base(graph, handler) { }