public CacheRepository(
     string AssemblyName,
     string Namespace)
 {
     CacheFacade = new CacheRepositoryFacade();
     if (
         !string.IsNullOrEmpty(AssemblyName) &&
         !string.IsNullOrEmpty(Namespace))
     {
         var size = Assembly.
                    Load(AssemblyName).
                    GetTypes().
                    Where(x => Namespace.Split(';').Contains(x.Namespace)).
                    Count();
         if (size == 0)
         {
             throw new Exception("List size can be 0! Verify the namespace and assembly names.");
         }
         InitCache(size);
     }
 }
Exemplo n.º 2
0
 public CacheRepository()
 {
     CacheFacade = new CacheRepositoryFacade();
     InitCache();
 }