Example #1
0
        public static PropertyDescriptor GetPropertyDesc(object obj, string propertyName)
        {
            IEnumerable <PropertyDescriptor> prop = ReflectionCache.GetProperties(obj);

            return
                (Enumerable.First(
                     Enumerable.Where(prop, (el) => el.Name == propertyName)));
        }
Example #2
0
 public static IEnumerable <PropertyDescriptor> Properties(this object obj)
 {
     return(ReflectionCache.GetProperties(obj));
 }