Properly handle ISet on Portable40 config
Up until now ISet members would not be properly deserialized, getting an exception that ISet cannot be instantiated.
This commit is contained in:
@@ -8681,7 +8681,7 @@ Path '', line 1, position 1.");
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !(NET20 || NET35 || PORTABLE40)
|
#if !(NET20 || NET35)
|
||||||
[Test]
|
[Test]
|
||||||
public void HashSetInterface()
|
public void HashSetInterface()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ namespace Newtonsoft.Json.Serialization
|
|||||||
CreatedType = typeof(List<>).MakeGenericType(CollectionItemType);
|
CreatedType = typeof(List<>).MakeGenericType(CollectionItemType);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !(NET20 || NET35 || PORTABLE40)
|
#if !(NET20 || NET35)
|
||||||
if (ReflectionUtils.IsGenericDefinition(underlyingType, typeof(ISet<>)))
|
if (ReflectionUtils.IsGenericDefinition(underlyingType, typeof(ISet<>)))
|
||||||
{
|
{
|
||||||
CreatedType = typeof(HashSet<>).MakeGenericType(CollectionItemType);
|
CreatedType = typeof(HashSet<>).MakeGenericType(CollectionItemType);
|
||||||
|
|||||||
Reference in New Issue
Block a user