From ce480a21f47e79e4e121d596aa83a6b2547d7aa5 Mon Sep 17 00:00:00 2001 From: timotei Date: Sun, 28 Feb 2016 22:11:54 +0200 Subject: [PATCH] Properly handle ISet on Portable40 config Up until now ISet members would not be properly deserialized, getting an exception that ISet cannot be instantiated. --- Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs | 2 +- Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs index 9c7b27a2..cb37f805 100644 --- a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs +++ b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs @@ -8681,7 +8681,7 @@ Path '', line 1, position 1."); } #endif -#if !(NET20 || NET35 || PORTABLE40) +#if !(NET20 || NET35) [Test] public void HashSetInterface() { diff --git a/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs b/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs index 1dafcb04..b39ca77e 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs @@ -167,7 +167,7 @@ namespace Newtonsoft.Json.Serialization CreatedType = typeof(List<>).MakeGenericType(CollectionItemType); } -#if !(NET20 || NET35 || PORTABLE40) +#if !(NET20 || NET35) if (ReflectionUtils.IsGenericDefinition(underlyingType, typeof(ISet<>))) { CreatedType = typeof(HashSet<>).MakeGenericType(CollectionItemType);