Example #1
0
        public ICriteria SetResultTransformer(IResultTransformer resultTransformer)
        {
            ICriteriaEvent criteriaEvent = new SetResultTransformerEvent(resultTransformer);

            foreach (IShard shard in shards)
            {
                if (shard.GetCriteriaById(criteriaId) != null)
                {
                    shard.GetCriteriaById(criteriaId).SetResultTransformer(resultTransformer);
                }
                else
                {
                    shard.AddCriteriaEvent(criteriaId, criteriaEvent);
                }
            }
            return(this);
        }
Example #2
0
        public ICriteria SetResultTransformer(IResultTransformer resultTransformer)
        {
            ICriteriaEvent criteriaEvent = new SetResultTransformerEvent(resultTransformer);

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