예제 #1
0
 public static PropertyAccessorHandler[] GetProperties(Type type)
 {
     if (type == (Type)null)
     {
         return((PropertyAccessorHandler[])null);
     }
     PropertyAccessorHandler[] propertyAccessorHandlerArray;
     if (DataTypeCache.typeCollection.TryGetValue(type, out propertyAccessorHandlerArray))
     {
         return(propertyAccessorHandlerArray);
     }
     PropertyAccessorHandler[] properties = DataTypeCache.CreateProperties(type);
     DataTypeCache.typeCollection.Add(type, properties);
     return(properties);
 }
예제 #2
0
 public static PropertyAccessorHandler[] GetProperties(Type type)
 {
     PropertyAccessorHandler[] result;
     PropertyAccessorHandler[] array;
     if (type == null)
     {
         result = null;
     }
     else if (DataTypeCache.typeCollection.TryGetValue(type, out array))
     {
         result = array;
     }
     else
     {
         array = DataTypeCache.CreateProperties(type);
         DataTypeCache.typeCollection.Add(type, array);
         result = array;
     }
     return(result);
 }