private static bool IsAutomationVisible(PropertyInfo propertyInfo)
{
var customAttributesOnProperty = propertyInfo.GetCustomAttributes(typeof (AutomationBrowsableAttribute),
true);
foreach (AutomationBrowsableAttribute attr in customAttributesOnProperty)
{
if (!attr.Browsable)
{
return false;
}
}
return true;
}