-Clean up PR

This commit is contained in:
James Newton-King
2015-04-02 20:28:01 +13:00
parent 415b2cf7fe
commit 5b392b54b8
3 changed files with 25 additions and 28 deletions
@@ -883,20 +883,20 @@ namespace Newtonsoft.Json.Utilities
{
ValidationUtils.ArgumentNotNull(targetType, "targetType");
List<PropertyInfo> propertyInfos;
List<PropertyInfo> propertyInfos;
if (!targetType.IsInterface())
{
propertyInfos = new List<PropertyInfo>(targetType.GetProperties(bindingAttr));
}
else
{
propertyInfos = (new Type[] { targetType })
.Concat(targetType.GetInterfaces())
.SelectMany(i => i.GetProperties(bindingAttr)).ToList();
}
if (!targetType.IsInterface())
{
propertyInfos = new List<PropertyInfo>(targetType.GetProperties(bindingAttr));
}
else
{
propertyInfos = (new Type[] { targetType })
.Concat(targetType.GetInterfaces())
.SelectMany(i => i.GetProperties(bindingAttr)).ToList();
}
GetChildPrivateProperties(propertyInfos, targetType, bindingAttr);
GetChildPrivateProperties(propertyInfos, targetType, bindingAttr);
// a base class private getter/setter will be inaccessable unless the property was gotten from the base class
for (int i = 0; i < propertyInfos.Count; i++)