Пример #1
0
 CachedReadWrite GetCachedType(Type type)
 {
     lock (TypeCache)
     {
         CachedReadWrite ret;
         if (!TypeCache.TryGetValue(type, out ret))
         {
             TypeCache.Add(type, ret = new CachedReadWrite(type));
         }
         return(ret);
     }
 }
Пример #2
0
 CachedReadWrite GetCachedType(Type type)
 {
     lock (TypeCache)
     {
         CachedReadWrite ret;
         if (!TypeCache.TryGetValue(type, out ret))
             TypeCache.Add(type, ret = new CachedReadWrite(type));
         return ret;
     }
 }