Exemple #1
0
        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());
        }
Exemple #2
0
 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();
 }