-Fixed WinRT build

This commit is contained in:
James Newton-King
2013-07-09 10:35:41 +12:00
parent 423d065c8f
commit 4f3f9d06eb
4 changed files with 19 additions and 0 deletions
@@ -164,6 +164,7 @@
<Compile Include="Serialization\DefaultValueHandlingTests.cs" />
<Compile Include="Serialization\DynamicTests.cs" />
<Compile Include="Serialization\EntitiesSerializationTests.cs" />
<Compile Include="Serialization\ImmutableCollectionsTests.cs" />
<Compile Include="Serialization\JsonPropertyCollectionTests.cs" />
<Compile Include="Serialization\JsonSerializerTest.cs" />
<Compile Include="Serialization\MissingMemberHandlingTests.cs" />
@@ -314,6 +315,11 @@
<ItemGroup>
<None Include="Newtonsoft.Json.Tests.WinRT_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Collections.Immutable">
<HintPath>..\packages\Microsoft.Bcl.Immutable.1.0.12-beta\lib\portable-net45+win8+wp8\System.Collections.Immutable.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' ">
<VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>
@@ -30,7 +30,13 @@ using System.Collections.Immutable;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#if !NETFX_CORE
using NUnit.Framework;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#endif
using Newtonsoft.Json.Linq;
namespace Newtonsoft.Json.Tests.Serialization
@@ -175,8 +175,10 @@ namespace Newtonsoft.Json.Tests.Serialization
serializer.ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor;
Assert.AreEqual(ConstructorHandling.AllowNonPublicDefaultConstructor, serializer.ConstructorHandling);
#if !NETFX_CORE
serializer.Context = new StreamingContext(StreamingContextStates.Other);
Assert.AreEqual(new StreamingContext(StreamingContextStates.Other), serializer.Context);
#endif
CamelCasePropertyNamesContractResolver resolver = new CamelCasePropertyNamesContractResolver();
serializer.ContractResolver = resolver;
@@ -265,8 +267,10 @@ namespace Newtonsoft.Json.Tests.Serialization
settings.ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor;
Assert.AreEqual(ConstructorHandling.AllowNonPublicDefaultConstructor, settings.ConstructorHandling);
#if !NETFX_CORE
settings.Context = new StreamingContext(StreamingContextStates.Other);
Assert.AreEqual(new StreamingContext(StreamingContextStates.Other), settings.Context);
#endif
CamelCasePropertyNamesContractResolver resolver = new CamelCasePropertyNamesContractResolver();
settings.ContractResolver = resolver;
@@ -355,8 +359,10 @@ namespace Newtonsoft.Json.Tests.Serialization
serializerProxy.ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor;
Assert.AreEqual(ConstructorHandling.AllowNonPublicDefaultConstructor, serializerProxy.ConstructorHandling);
#if !NETFX_CORE
serializerProxy.Context = new StreamingContext(StreamingContextStates.Other);
Assert.AreEqual(new StreamingContext(StreamingContextStates.Other), serializerProxy.Context);
#endif
CamelCasePropertyNamesContractResolver resolver = new CamelCasePropertyNamesContractResolver();
serializerProxy.ContractResolver = resolver;
@@ -275,6 +275,7 @@
<Compile Include="Utilities\EnumValues.cs" />
<Compile Include="Utilities\ExpressionReflectionDelegateFactory.cs" />
<Compile Include="Utilities\ILGeneratorExtensions.cs" />
<Compile Include="Utilities\ImmutableCollectionsUtils.cs" />
<Compile Include="Utilities\JavaScriptUtils.cs" />
<Compile Include="Utilities\LateBoundReflectionDelegateFactory.cs" />
<Compile Include="Utilities\LinqBridge.cs" />