Esempio n. 1
0
 public static PropertyAccessorHandler[] GetProperties <T>(Type type)
 {
     PropertyAccessorHandler[] properties = DataTypeCache.GetProperties(type);
     if (properties == null)
     {
         return(properties);
     }
     return(((IEnumerable <PropertyAccessorHandler>)properties).Where <PropertyAccessorHandler>((Func <PropertyAccessorHandler, bool>)(a => a.PropertyType.Equals(typeof(T)))).ToArray <PropertyAccessorHandler>());
 }
Esempio n. 2
0
 public static PropertyAccessorHandler[] GetProperties(Type type, string propertyName)
 {
     PropertyAccessorHandler[] properties = DataTypeCache.GetProperties(type);
     if (properties == null)
     {
         return(properties);
     }
     return(((IEnumerable <PropertyAccessorHandler>)properties).Where <PropertyAccessorHandler>((Func <PropertyAccessorHandler, bool>)(a => a.PropertyName == propertyName)).ToArray <PropertyAccessorHandler>());
 }
Esempio n. 3
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);
 }
Esempio n. 4
0
 public static PropertyAccessorHandler[] GetProperties <T>(Type type)
 {
     PropertyAccessorHandler[] properties = DataTypeCache.GetProperties(type);
     PropertyAccessorHandler[] result;
     if (properties == null)
     {
         result = properties;
     }
     else
     {
         result = (from a in properties
                   where a.PropertyType.Equals(typeof(T))
                   select a).ToArray <PropertyAccessorHandler>();
     }
     return(result);
 }
Esempio n. 5
0
 public static PropertyAccessorHandler[] GetProperties(Type type, string propertyName)
 {
     PropertyAccessorHandler[] properties = DataTypeCache.GetProperties(type);
     PropertyAccessorHandler[] result;
     if (properties == null)
     {
         result = properties;
     }
     else
     {
         result = (from a in properties
                   where a.PropertyName == propertyName
                   select a).ToArray <PropertyAccessorHandler>();
     }
     return(result);
 }
Esempio n. 6
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);
 }
Esempio n. 7
0
 internal PropertyAccessorHandler[] GetResourceProperties()
 {
     return(DataTypeCache.GetProperties <ResourceItemData>(this.GetType()));
 }
Esempio n. 8
0
 internal PropertyAccessorHandler[] GetProperties()
 {
     return(DataTypeCache.GetProperties(this.GetType()));
 }