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