private static PropertyInfo GetSecondObjectInfo(CompareParms parms, PropertyInfo info)
{
PropertyInfo secondObjectInfo = null;
if (parms.Config.IgnoreObjectTypes)
{
IEnumerable<PropertyInfo> secondObjectPropertyInfos = Cache.GetPropertyInfo(parms.Result, parms.Object2Type);
foreach (var propertyInfo in secondObjectPropertyInfos)
{
if (propertyInfo.Name != info.Name) continue;
secondObjectInfo = propertyInfo;
break;
}
}
else
secondObjectInfo = info;
return secondObjectInfo;
}