예제 #1
0
        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);
        }
예제 #2
0
 private static bool CompareQueries(QueryCompiler.CompiledQuery x, QueryCompiler.CompiledQuery y)
 {
     return(ExpressionComparer.AreEqual(x.Query, y.Query, fnCompareValues));
 }