public static void ProcessPublicInstancePropertyDescriptorsWithSingleAttribute <T>(Type type, ForEachPropertyDescriptorWithSingleAttribute <T> forEach,
                                                                                    bool baseClassPropertiesFirst) where T : Attribute
 {
     ProcessPublicInstancePropertyDescriptors(type, delegate(PropertyDescriptor propertyDescriptor)
     {
         AttributeCollection attributes = propertyDescriptor.Attributes;
         T attribute = null;
         foreach (Attribute curAttribute in attributes)
         {
             T assignAttribute = curAttribute as T;
             if (assignAttribute != null)
             {
                 attribute = assignAttribute;
                 break;
             }
         }
         if (attribute != null)
         {
             return(forEach(propertyDescriptor, attribute));
         }
         return(true);
     }, baseClassPropertiesFirst);
 }
 public static void ProcessPublicInstancePropertiesWithSingleAttribute <T>(Type type, ForEachPropertyDescriptorWithSingleAttribute <T> forEach) where T : Attribute
 {
     ProcessPublicInstancePropertyDescriptorsWithSingleAttribute <T>(type, forEach, false);
 }