Exemple #1
0
        public ICriteria SetCacheMode(CacheMode cacheMode)
        {
            ICriteriaEvent criteriaEvent = new SetCacheModeEvent(cacheMode);

            foreach (IShard shard in shards)
            {
                if (shard.GetCriteriaById(criteriaId) != null)
                {
                    shard.GetCriteriaById(criteriaId).SetCacheMode(cacheMode);
                }
                else
                {
                    shard.AddCriteriaEvent(criteriaId, criteriaEvent);
                }
            }
            return(this);
        }
Exemple #2
0
        public ICriteria SetCacheMode(CacheMode cacheMode)
        {
            ICriteriaEvent criteriaEvent = new SetCacheModeEvent(cacheMode);

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