Exemplo n.º 1
0
        private ITypeSpecImmutable GetSpecificationFromCache(Type type)
        {
            var key = classStrategy.GetKeyForType(type);

            TypeUtils.GetType(type.FullName); // This should ensure type is cached
            return(cache.GetSpecification(key));
        }
Exemplo n.º 2
0
 public IObjectSpecImmutable GetSpecification(string name)
 {
     try {
         Type type = TypeUtils.GetType(name);
         return(GetSpecification(type));
     }
     catch (Exception e) {
         Log.InfoFormat("Failed to Load Specification for: {0} error: {1} trying cache", name, e);
         IObjectSpecImmutable spec = cache.GetSpecification(name);
         if (spec != null)
         {
             Log.InfoFormat("Found {0} in cache", name);
             return(spec);
         }
         throw;
     }
 }