private QueryCompiler.CompiledQuery Find(Expression query, bool add, out object[] args) { var pq = this.Parameterize(query, out args); var cq = new QueryCompiler.CompiledQuery(pq); QueryCompiler.CompiledQuery cached; if (add) { cached = this.cache.GetOrAdd(cq); } else { this.cache.TryGet(cq, out cached); } return(cached); }
private static bool CompareQueries(QueryCompiler.CompiledQuery x, QueryCompiler.CompiledQuery y) { return(ExpressionComparer.AreEqual(x.Query, y.Query, fnCompareValues)); }