-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
@@ -100,6 +100,8 @@ namespace Newtonsoft.Json.Serialization
if (CollectionItemType != null)
ParametrizedConstructor = CollectionUtils.ResolveEnumableCollectionConstructor(underlyingType, CollectionItemType);
IsReadOnlyOrFixedSize = ReflectionUtils.InheritsGenericDefinition(underlyingType, typeof(ReadOnlyCollection<>));
canDeserialize = true;
}
else if (ReflectionUtils.ImplementsGenericDefinition(underlyingType, typeof(ICollection<>), out _genericCollectionDefinitionType))