예제 #1
0
 public static void ProcessPublicInstancePropertyDescriptors(object obj, ForEachPropertyDescriptor forEach)
 {
     if (obj == null)
     {
         return;
     }
     ProcessPublicInstancePropertyDescriptors(obj.GetType(), forEach);
 }
예제 #2
0
        public static void ProcessPublicInstancePropertyDescriptors(Type type, ForEachPropertyDescriptor forEach, bool baseClassPropertiesFirst)
        {
            PropertyDescriptorCollection propertyDescriptors = TypeDescriptor.GetProperties(type);

            foreach (PropertyDescriptor propertyDescriptor in propertyDescriptors)
            {
                if (!forEach(propertyDescriptor))
                {
                    return;
                }
            }
        }
예제 #3
0
 public static void ProcessPublicInstancePropertyDescriptors(Type type, ForEachPropertyDescriptor forEach)
 {
     ProcessPublicInstancePropertyDescriptors(type, forEach, false);
 }