public static PropertyInfo GetDataPropertyDisplayType(object obj, DataPropertyDisplayType displayType) { return(obj.GetType() .GetProperties() .Where(p => DataPropertyDisplay.IsDefined(p, typeof(DataPropertyDisplay))) .Where(p => (((DataPropertyDisplay)DataPropertyDisplay.GetCustomAttribute( p, typeof(DataPropertyDisplay))).Type == displayType)).FirstOrDefault()); }
public DataPropertyDisplay(DataPropertyDisplayType type) { this.Type = type; }