示例#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;
            this.cache.Lookup(cq, add, out cached);
            return(cached);
        }
示例#2
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);
        }
示例#3
0
 private static bool CompareQueries(QueryCompiler.CompiledQuery x, QueryCompiler.CompiledQuery y)
 {
     return(ExpressionComparer.AreEqual(x.Query, y.Query, fnCompareValues));
 }