public Rule(string name, string[] tags, ComplexSelector selector, Func<SelectOutput,WhereOutput> where, Action<ModInput> apply) { this._selector=selector; this._where=where; this._apply=apply; this.Name = name; this.Tags=new ReadOnlyCollection<string>(tags); }
static void Test(int expectedCount, params object[] q) { var num = q.Length / 2; var clauses = q.Take(num).Select(z => (SelectClauseNode) z).ToArray(); var roots = q.Skip(num).Select(z => (INode) z).ToArray(); var selector = new ComplexSelector(clauses); Assert.That(selector.Select(roots).Count() == expectedCount); }
public SelectRule(NewRule newRule, ComplexSelector selector) { this.Selector = selector; NewRule = newRule; }