示例#1
0
 public object Create(Type t, string name)
 {
     if (t.IsAssignableFrom(typeof(HDDRepository)))
     {
         if (!_repositoryDictionary.ContainsKey(name))
         {
             HDDRepositoryParameters parameters = new HDDRepositoryParameters();
             if (parameters.Load(name))
             {
                 HDDRepository instance = new HDDRepository(parameters);
                 _repositoryDictionary.Add(name, instance);
                 return(instance);
             }
         }
         else
         {
             return(_repositoryDictionary[name]);
         }
     }
     return(null);
 }
示例#2
0
 internal HDDRepository(HDDRepositoryParameters parameters)
     : base(parameters.Logger)
 {
     _parameters = parameters;
 }