Exemplo n.º 1
0
        public ICriteria SetCacheable(bool cacheable)
        {
            ICriteriaEvent criteriaEvent = new SetCacheableEvent(cacheable);

            foreach (IShard shard in shards)
            {
                if (shard.GetCriteriaById(criteriaId) != null)
                {
                    shard.GetCriteriaById(criteriaId).SetCacheable(cacheable);
                }
                else
                {
                    shard.AddCriteriaEvent(criteriaId, criteriaEvent);
                }
            }
            return(this);
        }
Exemplo n.º 2
0
        public ICriteria SetCacheable(bool cacheable)
        {
            ICriteriaEvent criteriaEvent = new SetCacheableEvent(cacheable);

            foreach (IShard shard in shards)
            {
                if (shardToCriteriaMap[shard] != null)
                {
                    shardToCriteriaMap[shard].SetCacheable(cacheable);
                }
                else
                {
                    shardToEventListMap[shard].Add(criteriaEvent);
                }
            }
            return(this);
        }