-Fixed error when populating onto read only collections

-Fixed serializing hidden properties
-Readded DataContractAttribute inheritance
This commit is contained in:
James Newton-King
2013-04-07 03:55:35 +12:00
parent 03be3ed7a6
commit 1abcfb1ace
11 changed files with 475 additions and 56 deletions
@@ -89,6 +89,10 @@ namespace Newtonsoft.Json.Serialization
if (ReflectionUtils.IsGenericDefinition(UnderlyingType, typeof(IDictionary<,>)))
CreatedType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType);
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
IsReadOnlyOrFixedSize = ReflectionUtils.InheritsGenericDefinition(underlyingType, typeof(ReadOnlyDictionary<,>));
#endif
}
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
else if (ReflectionUtils.ImplementsGenericDefinition(underlyingType, typeof(IReadOnlyDictionary<,>), out _genericCollectionDefinitionType))