Merge branch 'master' of https://github.com/ravensorb/Newtonsoft.Json into ravensorb-master
This commit is contained in:
@@ -883,8 +883,20 @@ namespace Newtonsoft.Json.Utilities
|
||||
{
|
||||
ValidationUtils.ArgumentNotNull(targetType, "targetType");
|
||||
|
||||
List<PropertyInfo> propertyInfos = new List<PropertyInfo>(targetType.GetProperties(bindingAttr));
|
||||
GetChildPrivateProperties(propertyInfos, targetType, bindingAttr);
|
||||
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();
|
||||
}
|
||||
|
||||
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++)
|
||||
|
||||
Reference in New Issue
Block a user