public static PropertyInfo[] GetMatchedPropertiesForEachAttribute(object specifiedObject, Type attributeType) { List <PropertyInfo> properties = new List <PropertyInfo>(); Reflector hepler = new Reflector(specifiedObject); foreach (KeyValuePair <String, PropertyInfo> item in hepler.ObjectProperties) { if (hepler.ExistAttribute(item.Key, attributeType)) { properties.Add(item.Value); } } return(properties.ToArray()); }
public static PropertyInfo[] GetMatchedPropertiesForEachAttribute(object specifiedObject, Type attributeType) { List<PropertyInfo> properties = new List<PropertyInfo>(); Reflector hepler = new Reflector(specifiedObject); foreach (KeyValuePair<String, PropertyInfo> item in hepler.ObjectProperties) { if (hepler.ExistAttribute(item.Key, attributeType)) { properties.Add(item.Value); } } return properties.ToArray(); }