Пример #1
0
            public Func <T> Prepare(IShard shard)
            {
                // NOTE: Establish action is not thread-safe and therefore must not be performed by returned delegate.
                var criteria = shardedCriteria.EstablishFor(shard);

                return(criteria.UniqueResult <T>);
            }
        private void Add(string key, IShardedCriteria shardedCriteria, Func <IList> resultFactory)
        {
            entries.Add(new CriteriaEntry(key, shardedCriteria, resultFactory));

            foreach (var pair in this.establishedMultiCriteriaByShard)
            {
                pair.Value.Add(key, shardedCriteria.EstablishFor(pair.Key));
            }
        }