示例#1
0
 public void SetRepository(Type shard, IExtentSet repository)
 {
     if (shard == null)
     {
         throw new ArgumentException("shard");
     }
     if (repository == null)
     {
         throw new ArgumentException("repository");
     }
     if (shard == _type)
     {
         _defaultExtentSet = repository;
     }
     // repositories
     if (_extentSets == null)
     {
         _extentSets = new Dictionary <Type, IExtentSet>();
     }
     _extentSets[shard] = repository;
 }
示例#2
0
 public void SetRepository <TShard>(IExtentSet repository)
 {
     SetRepository(typeof(TShard), repository);
 }