-Misc refactoring

This commit is contained in:
JamesNK
2008-10-16 06:16:39 +00:00
parent 68af212cfb
commit 4e8002bdcb
3 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -282,7 +282,7 @@ namespace Newtonsoft.Json
{
value = CreateJToken(reader);
}
else if (typeof(IDictionary).IsAssignableFrom(objectType) || ReflectionUtils.ImplementsGenericInterfaceDefinition(objectType, typeof(IDictionary<,>)))
else if (typeof(IDictionary).IsAssignableFrom(objectType) || ReflectionUtils.ImplementsGenericDefinition(objectType, typeof(IDictionary<,>)))
{
if (existingValue == null)
value = CreateAndPopulateDictionary(reader, objectType);
@@ -493,7 +493,7 @@ namespace Newtonsoft.Json
{
currentValue = ReflectionUtils.GetMemberValue(memberMapping.Member, target);
useExistingValue = (currentValue != null && !memberType.IsArray && !ReflectionUtils.InheritsGenericClassDefinition(memberType, typeof(ReadOnlyCollection<>)));
useExistingValue = (currentValue != null && !memberType.IsArray && !ReflectionUtils.InheritsGenericDefinition(memberType, typeof(ReadOnlyCollection<>)));
}