示例#1
0
 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());
 }
示例#2
0
 public DataPropertyDisplay(DataPropertyDisplayType type)
 {
     this.Type = type;
 }