PropertyInfo FindBoolProperty(object obj, out object target)
{
PropertyInfo prop = obj.GetType().GetProperty (name, flags);
if (prop != null && prop.PropertyType == typeof(bool)) {
target = obj;
return prop;
}
ObjectWrapper wrap = ObjectWrapper.Lookup (obj);
if (wrap != null) {
prop = wrap.GetType().GetProperty (name, flags);
if (prop != null && prop.PropertyType == typeof(bool)) {
target = wrap;
return prop;
}
}
target = null;
return null;
}