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); }
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); }