-Upgraded Windows Phone project to WP8

This commit is contained in:
James Newton-King
2013-03-11 20:14:24 +13:00
parent 0e753888d0
commit 4d291cfc3d
26 changed files with 89 additions and 97 deletions
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE. // OTHER DEALINGS IN THE SOFTWARE.
#endregion #endregion
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -14,7 +14,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Newtonsoft.Json.Tests</RootNamespace> <RootNamespace>Newtonsoft.Json.Tests</RootNamespace>
<AssemblyName>Newtonsoft.Json.Tests</AssemblyName> <AssemblyName>Newtonsoft.Json.Tests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<SilverlightApplication>false</SilverlightApplication> <SilverlightApplication>false</SilverlightApplication>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
@@ -52,6 +52,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@@ -63,10 +64,12 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="Microsoft.CSharp, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Microsoft SDKs\Silverlight\v5.0\Libraries\Client\Microsoft.CSharp.dll</HintPath>
</Reference> </Reference>
<Reference Include="nunit.framework, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@@ -11,13 +11,16 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Newtonsoft.Json.Tests</RootNamespace> <RootNamespace>Newtonsoft.Json.Tests</RootNamespace>
<AssemblyName>Newtonsoft.Json.Tests</AssemblyName> <AssemblyName>Newtonsoft.Json.Tests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion> <SilverlightVersion>
<TargetFrameworkProfile>WindowsPhone</TargetFrameworkProfile> </SilverlightVersion>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier> <TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<SilverlightApplication>false</SilverlightApplication> <SilverlightApplication>false</SilverlightApplication>
<ValidateXaml>true</ValidateXaml> <ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation> <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -29,6 +32,7 @@
<NoConfig>true</NoConfig> <NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@@ -39,29 +43,12 @@
<NoConfig>true</NoConfig> <NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="nunit.framework"> <Reference Include="nunit.framework">
<HintPath>..\Lib\NUnit\Silverlight\nunit.framework.dll</HintPath> <HintPath>..\Lib\NUnit\Silverlight\nunit.framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Runtime.Serialization">
<Private>True</Private>
</Reference>
<Reference Include="System.Windows">
<Private>True</Private>
</Reference>
<Reference Include="system">
<Private>True</Private>
</Reference>
<Reference Include="System.Core">
<Private>True</Private>
</Reference>
<Reference Include="System.Xml">
<Private>True</Private>
</Reference>
<Reference Include="System.Net">
<Private>True</Private>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Bson\BsonReaderTests.cs" /> <Compile Include="Bson\BsonReaderTests.cs" />
@@ -79,6 +66,7 @@
<Compile Include="JsonArrayAttributeTests.cs" /> <Compile Include="JsonArrayAttributeTests.cs" />
<Compile Include="Linq\ComponentModel\BindingTests.cs" /> <Compile Include="Linq\ComponentModel\BindingTests.cs" />
<Compile Include="Linq\ComponentModel\JPropertyDescriptorTests.cs" /> <Compile Include="Linq\ComponentModel\JPropertyDescriptorTests.cs" />
<Compile Include="Linq\DynamicTests.cs" />
<Compile Include="Linq\JPathTests.cs" /> <Compile Include="Linq\JPathTests.cs" />
<Compile Include="Linq\JRawTests.cs" /> <Compile Include="Linq\JRawTests.cs" />
<Compile Include="Linq\JTokenReaderTest.cs" /> <Compile Include="Linq\JTokenReaderTest.cs" />
@@ -235,8 +223,8 @@
<Name>Newtonsoft.Json.WindowsPhone</Name> <Name>Newtonsoft.Json.WindowsPhone</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions /> <ProjectExtensions />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
@@ -177,7 +177,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}", json); }", json);
} }
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
[Test] [Test]
public void DynamicCamelCasePropertyNames() public void DynamicCamelCasePropertyNames()
{ {
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE. // OTHER DEALINGS IN THE SOFTWARE.
#endregion #endregion
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@@ -24,7 +24,7 @@
#endregion #endregion
using System; using System;
#if !(NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE) #if !(NET35 || NET20 || SILVERLIGHT)
using System.Collections.Concurrent; using System.Collections.Concurrent;
#endif #endif
using System.Collections.Generic; using System.Collections.Generic;
@@ -53,7 +53,7 @@ using System.Collections.ObjectModel;
using Newtonsoft.Json.Bson; using Newtonsoft.Json.Bson;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
#if !NET20 && !WINDOWS_PHONE #if !NET20
using System.Runtime.Serialization.Json; using System.Runtime.Serialization.Json;
#endif #endif
using Newtonsoft.Json.Serialization; using Newtonsoft.Json.Serialization;
@@ -69,7 +69,7 @@ using System.Text.RegularExpressions;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.Linq.Expressions; using System.Linq.Expressions;
#endif #endif
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System.Dynamic; using System.Dynamic;
using System.ComponentModel; using System.ComponentModel;
#endif #endif
@@ -173,7 +173,7 @@ namespace Newtonsoft.Json.Tests.Serialization
string jsonText = JsonConvert.SerializeObject(testDictionary); string jsonText = JsonConvert.SerializeObject(testDictionary);
#if !NET20 && !WINDOWS_PHONE #if !NET20
MemoryStream ms = new MemoryStream(); MemoryStream ms = new MemoryStream();
DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Dictionary<string, object>)); DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Dictionary<string, object>));
serializer.WriteObject(ms, testDictionary); serializer.WriteObject(ms, testDictionary);
@@ -432,7 +432,7 @@ keyword such as type of business.""
CollectionAssert.AreEqual(r1, r2); CollectionAssert.AreEqual(r1, r2);
} }
#if !NET20 && !WINDOWS_PHONE #if !NET20
[Test] [Test]
public void Unicode() public void Unicode()
{ {
@@ -2123,7 +2123,7 @@ Path '', line 1, position 1.",
}); });
} }
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
[Test] [Test]
public void CannotDeserializeArrayIntoDynamic() public void CannotDeserializeArrayIntoDynamic()
{ {
@@ -2783,7 +2783,7 @@ Path '', line 1, position 2.",
public string Ethnicity { get; set; } public string Ethnicity { get; set; }
} }
#if !NET20 && !WINDOWS_PHONE #if !NET20
public class DataContractJsonSerializerTestClass public class DataContractJsonSerializerTestClass
{ {
public TimeSpan TimeSpanProperty { get; set; } public TimeSpan TimeSpanProperty { get; set; }
@@ -4318,7 +4318,7 @@ To fix this error either change the environment to be fully trusted, change the
}", json); }", json);
} }
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
[Test] [Test]
public void SerializeExpandoObject() public void SerializeExpandoObject()
{ {
@@ -7395,7 +7395,7 @@ Parameter name: value",
} }
#endif #endif
#if !(PORTABLE || NET20 || NET35 || WINDOWS_PHONE) #if !(PORTABLE || NET20 || NET35)
[Test] [Test]
public void HashSetInterface() public void HashSetInterface()
{ {
@@ -32,7 +32,7 @@ using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#endif #endif
#if !(NET20 || NET35 || WINDOWS_PHONE) #if !(NET20 || NET35)
using System.Dynamic; using System.Dynamic;
#endif #endif
using System.Runtime.Serialization; using System.Runtime.Serialization;
@@ -210,7 +210,7 @@ namespace Newtonsoft.Json.Tests.Serialization
} }
#endif #endif
#if !(NET20 || NET35 || WINDOWS_PHONE) #if !(NET20 || NET35)
public class DictionaryDynamicObject : DynamicObject public class DictionaryDynamicObject : DynamicObject
{ {
public IDictionary<string, object> Values { get; private set; } public IDictionary<string, object> Values { get; private set; }
@@ -612,7 +612,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(@"Unexpected end when deserializing object. Path 'events2.code', line 1, position 49.", errors[1]); Assert.AreEqual(@"Unexpected end when deserializing object. Path 'events2.code', line 1, position 49.", errors[1]);
} }
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
[Test] [Test]
public void ErrorHandlingEndOfContentDynamic() public void ErrorHandlingEndOfContentDynamic()
{ {
@@ -24,7 +24,7 @@
#endregion #endregion
#if !PORTABLE #if !PORTABLE
#if !(NET35 || NET20 || WINDOWS_PHONE || PORTABLE) #if !(NET35 || NET20 || PORTABLE)
using System.Dynamic; using System.Dynamic;
#endif #endif
using System.Text; using System.Text;
@@ -1445,7 +1445,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(1, (int)j["MyProperty"]); Assert.AreEqual(1, (int)j["MyProperty"]);
} }
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
[Test] [Test]
public void PropertyItemTypeNameHandlingDynamic() public void PropertyItemTypeNameHandlingDynamic()
{ {
@@ -1651,7 +1651,7 @@ namespace Newtonsoft.Json.Tests.Serialization
public TypeNameHandlingTestObject Data { get; set; } public TypeNameHandlingTestObject Data { get; set; }
} }
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
public class PropertyItemTypeNameHandlingDynamic public class PropertyItemTypeNameHandlingDynamic
{ {
[JsonProperty(ItemTypeNameHandling = TypeNameHandling.All)] [JsonProperty(ItemTypeNameHandling = TypeNameHandling.All)]
+2 -2
View File
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 11.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2010 # Visual Studio 2012
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{F69285DD-24FB-4A60-AE8B-4C2744285D0F}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{F69285DD-24FB-4A60-AE8B-4C2744285D0F}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
Lib\NUnit\Silverlight\nunit.framework.dll = Lib\NUnit\Silverlight\nunit.framework.dll Lib\NUnit\Silverlight\nunit.framework.dll = Lib\NUnit\Silverlight\nunit.framework.dll
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE. // OTHER DEALINGS IN THE SOFTWARE.
#endregion #endregion
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
+2 -2
View File
@@ -28,7 +28,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.ComponentModel; using System.ComponentModel;
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System.Dynamic; using System.Dynamic;
using System.Linq.Expressions; using System.Linq.Expressions;
#endif #endif
@@ -755,7 +755,7 @@ namespace Newtonsoft.Json.Linq
#endregion #endregion
#endif #endif
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
/// <summary> /// <summary>
/// Returns the <see cref="T:System.Dynamic.DynamicMetaObject"/> responsible for binding operations performed on this object. /// Returns the <see cref="T:System.Dynamic.DynamicMetaObject"/> responsible for binding operations performed on this object.
/// </summary> /// </summary>
+3 -3
View File
@@ -25,7 +25,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System.Dynamic; using System.Dynamic;
using System.Linq.Expressions; using System.Linq.Expressions;
#endif #endif
@@ -50,7 +50,7 @@ namespace Newtonsoft.Json.Linq
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE) #if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
, ICloneable , ICloneable
#endif #endif
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
, IDynamicMetaObjectProvider , IDynamicMetaObjectProvider
#endif #endif
{ {
@@ -1704,7 +1704,7 @@ namespace Newtonsoft.Json.Linq
return p.Evaluate(this, errorWhenNoMatch); return p.Evaluate(this, errorWhenNoMatch);
} }
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
/// <summary> /// <summary>
/// Returns the <see cref="T:System.Dynamic.DynamicMetaObject"/> responsible for binding operations performed on this object. /// Returns the <see cref="T:System.Dynamic.DynamicMetaObject"/> responsible for binding operations performed on this object.
/// </summary> /// </summary>
+3 -3
View File
@@ -27,7 +27,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using Newtonsoft.Json.Utilities; using Newtonsoft.Json.Utilities;
using System.Globalization; using System.Globalization;
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System.Dynamic; using System.Dynamic;
using System.Linq.Expressions; using System.Linq.Expressions;
#endif #endif
@@ -304,7 +304,7 @@ namespace Newtonsoft.Json.Linq
return d1.CompareTo(d2); return d1.CompareTo(d2);
} }
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
private static bool Operation(ExpressionType operation, object objA, object objB, out object result) private static bool Operation(ExpressionType operation, object objA, object objB, out object result)
{ {
if (objA is string || objB is string) if (objA is string || objB is string)
@@ -714,7 +714,7 @@ namespace Newtonsoft.Json.Linq
return _value.ToString(); return _value.ToString();
} }
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
/// <summary> /// <summary>
/// Returns the <see cref="T:System.Dynamic.DynamicMetaObject"/> responsible for binding operations performed on this object. /// Returns the <see cref="T:System.Dynamic.DynamicMetaObject"/> responsible for binding operations performed on this object.
/// </summary> /// </summary>
@@ -14,7 +14,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Newtonsoft.Json</RootNamespace> <RootNamespace>Newtonsoft.Json</RootNamespace>
<AssemblyName>Newtonsoft.Json</AssemblyName> <AssemblyName>Newtonsoft.Json</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<SilverlightApplication>false</SilverlightApplication> <SilverlightApplication>false</SilverlightApplication>
<ValidateXaml>true</ValidateXaml> <ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>false</ThrowErrorsInValidation> <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
@@ -56,6 +56,7 @@
<DocumentationFile>Bin\Debug\Silverlight\Newtonsoft.Json.xml</DocumentationFile> <DocumentationFile>Bin\Debug\Silverlight\Newtonsoft.Json.xml</DocumentationFile>
<CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis> <RunCodeAnalysis>true</RunCodeAnalysis>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@@ -69,6 +70,7 @@
<DocumentationFile>Bin\Release\Silverlight\Newtonsoft.Json.xml</DocumentationFile> <DocumentationFile>Bin\Release\Silverlight\Newtonsoft.Json.xml</DocumentationFile>
<CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis> <RunCodeAnalysis>true</RunCodeAnalysis>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System.Runtime.Serialization" /> <Reference Include="System.Runtime.Serialization" />
@@ -11,13 +11,16 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Newtonsoft.Json</RootNamespace> <RootNamespace>Newtonsoft.Json</RootNamespace>
<AssemblyName>Newtonsoft.Json</AssemblyName> <AssemblyName>Newtonsoft.Json</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion> <SilverlightVersion>
<TargetFrameworkProfile>WindowsPhone</TargetFrameworkProfile> </SilverlightVersion>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier> <TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<SilverlightApplication>false</SilverlightApplication> <SilverlightApplication>false</SilverlightApplication>
<ValidateXaml>true</ValidateXaml> <ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation> <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -33,6 +36,7 @@
</DocumentationFile> </DocumentationFile>
<RunCodeAnalysis>true</RunCodeAnalysis> <RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@@ -46,16 +50,8 @@
<DocumentationFile>Bin\Release\WindowsPhone\Newtonsoft.Json.xml</DocumentationFile> <DocumentationFile>Bin\Release\WindowsPhone\Newtonsoft.Json.xml</DocumentationFile>
<RunCodeAnalysis>true</RunCodeAnalysis> <RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Windows" />
<Reference Include="system" />
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Reference Include="System.Net" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Bson\BsonBinaryType.cs" /> <Compile Include="Bson\BsonBinaryType.cs" />
<Compile Include="Bson\BsonBinaryWriter.cs" /> <Compile Include="Bson\BsonBinaryWriter.cs" />
@@ -185,7 +181,10 @@
<Compile Include="Utilities\ConvertUtils.cs" /> <Compile Include="Utilities\ConvertUtils.cs" />
<Compile Include="Utilities\DateTimeUtils.cs" /> <Compile Include="Utilities\DateTimeUtils.cs" />
<Compile Include="Utilities\DictionaryWrapper.cs" /> <Compile Include="Utilities\DictionaryWrapper.cs" />
<Compile Include="Utilities\DynamicProxy.cs" />
<Compile Include="Utilities\DynamicProxyMetaObject.cs" />
<Compile Include="Utilities\DynamicReflectionDelegateFactory.cs" /> <Compile Include="Utilities\DynamicReflectionDelegateFactory.cs" />
<Compile Include="Utilities\DynamicUtils.cs" />
<Compile Include="Utilities\DynamicWrapper.cs" /> <Compile Include="Utilities\DynamicWrapper.cs" />
<Compile Include="Utilities\EnumUtils.cs" /> <Compile Include="Utilities\EnumUtils.cs" />
<Compile Include="Utilities\EnumValue.cs" /> <Compile Include="Utilities\EnumValue.cs" />
@@ -224,8 +223,8 @@
<Compile Include="Serialization\JsonTypeReflector.cs" /> <Compile Include="Serialization\JsonTypeReflector.cs" />
<Compile Include="WriteState.cs" /> <Compile Include="WriteState.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions /> <ProjectExtensions />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
@@ -25,12 +25,12 @@
using System; using System;
using System.Collections; using System.Collections;
#if !(NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE) #if !(NET35 || NET20 || SILVERLIGHT || PORTABLE)
using System.Collections.Concurrent; using System.Collections.Concurrent;
#endif #endif
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System.Dynamic; using System.Dynamic;
#endif #endif
using System.Globalization; using System.Globalization;
@@ -100,7 +100,7 @@ namespace Newtonsoft.Json.Serialization
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE) #if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE)
new EntityKeyMemberConverter(), new EntityKeyMemberConverter(),
#endif #endif
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
new ExpandoObjectConverter(), new ExpandoObjectConverter(),
#endif #endif
#if (!(SILVERLIGHT) || WINDOWS_PHONE) #if (!(SILVERLIGHT) || WINDOWS_PHONE)
@@ -748,7 +748,7 @@ namespace Newtonsoft.Json.Serialization
} }
#endif #endif
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
/// <summary> /// <summary>
/// Creates a <see cref="JsonDynamicContract"/> for the given type. /// Creates a <see cref="JsonDynamicContract"/> for the given type.
/// </summary> /// </summary>
@@ -817,7 +817,7 @@ namespace Newtonsoft.Json.Serialization
return CreateISerializableContract(objectType); return CreateISerializableContract(objectType);
#endif #endif
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
if (typeof(IDynamicMetaObjectProvider).IsAssignableFrom(t)) if (typeof(IDynamicMetaObjectProvider).IsAssignableFrom(t))
return CreateDynamicContract(objectType); return CreateDynamicContract(objectType);
#endif #endif
@@ -86,8 +86,8 @@ namespace Newtonsoft.Json.Serialization
if (IsTypeGenericCollectionInterface(UnderlyingType)) if (IsTypeGenericCollectionInterface(UnderlyingType))
CreatedType = ReflectionUtils.MakeGenericType(typeof(List<>), CollectionItemType); CreatedType = ReflectionUtils.MakeGenericType(typeof(List<>), CollectionItemType);
#if !(NET20 || NET35 || WINDOWS_PHONE) #if !(NET20 || NET35)
else if (IsTypeGenericSetnterface(UnderlyingType)) else if (IsTypeGenericSetInterface(UnderlyingType))
CreatedType = ReflectionUtils.MakeGenericType(typeof(HashSet<>), CollectionItemType); CreatedType = ReflectionUtils.MakeGenericType(typeof(HashSet<>), CollectionItemType);
#endif #endif
@@ -155,8 +155,8 @@ namespace Newtonsoft.Json.Serialization
|| genericDefinition == typeof(IEnumerable<>)); || genericDefinition == typeof(IEnumerable<>));
} }
#if !(NET20 || NET35 || WINDOWS_PHONE) #if !(NET20 || NET35)
private bool IsTypeGenericSetnterface(Type type) private bool IsTypeGenericSetInterface(Type type)
{ {
if (!type.IsGenericType()) if (!type.IsGenericType())
return false; return false;
@@ -42,7 +42,7 @@ namespace Newtonsoft.Json.Serialization
Primitive, Primitive,
String, String,
Dictionary, Dictionary,
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
Dynamic, Dynamic,
#endif #endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE) #if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE. // OTHER DEALINGS IN THE SOFTWARE.
#endregion #endregion
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Dynamic; using System.Dynamic;
@@ -27,7 +27,7 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System.ComponentModel; using System.ComponentModel;
using System.Dynamic; using System.Dynamic;
#endif #endif
@@ -288,7 +288,7 @@ namespace Newtonsoft.Json.Serialization
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE) #if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
case JsonContractType.Serializable: case JsonContractType.Serializable:
#endif #endif
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
case JsonContractType.Dynamic: case JsonContractType.Dynamic:
#endif #endif
return @"JSON object (e.g. {""name"":""value""})"; return @"JSON object (e.g. {""name"":""value""})";
@@ -393,7 +393,7 @@ namespace Newtonsoft.Json.Serialization
targetDictionary = CreateNewDictionary(reader, dictionaryContract); targetDictionary = CreateNewDictionary(reader, dictionaryContract);
return PopulateDictionary(dictionaryContract.CreateWrapper(targetDictionary), reader, dictionaryContract, member, id); return PopulateDictionary(dictionaryContract.CreateWrapper(targetDictionary), reader, dictionaryContract, member, id);
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
case JsonContractType.Dynamic: case JsonContractType.Dynamic:
JsonDynamicContract dynamicContract = (JsonDynamicContract) contract; JsonDynamicContract dynamicContract = (JsonDynamicContract) contract;
return CreateDynamic(reader, dynamicContract, member, id); return CreateDynamic(reader, dynamicContract, member, id);
@@ -490,7 +490,7 @@ To fix this error either change the JSON to a {1} or change the deserialized typ
TraceWriter.Trace(TraceLevel.Verbose, JsonPosition.FormatMessage(reader as IJsonLineInfo, reader.Path, "Resolved type '{0}' to {1}.".FormatWith(CultureInfo.InvariantCulture, qualifiedTypeName, specifiedType)), null); TraceWriter.Trace(TraceLevel.Verbose, JsonPosition.FormatMessage(reader as IJsonLineInfo, reader.Path, "Resolved type '{0}' to {1}.".FormatWith(CultureInfo.InvariantCulture, qualifiedTypeName, specifiedType)), null);
if (objectType != null if (objectType != null
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
&& objectType != typeof (IDynamicMetaObjectProvider) && objectType != typeof (IDynamicMetaObjectProvider)
#endif #endif
&& !objectType.IsAssignableFrom(specifiedType)) && !objectType.IsAssignableFrom(specifiedType))
@@ -621,7 +621,7 @@ To fix this error either change the JSON to a {1} or change the deserialized typ
private bool HasDefinedType(Type type) private bool HasDefinedType(Type type)
{ {
return (type != null && type != typeof (object) && !typeof (JToken).IsSubclassOf(type) return (type != null && type != typeof (object) && !typeof (JToken).IsSubclassOf(type)
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
&& type != typeof (IDynamicMetaObjectProvider) && type != typeof (IDynamicMetaObjectProvider)
#endif #endif
); );
@@ -1209,7 +1209,7 @@ To fix this error either change the environment to be fully trusted, change the
} }
#endif #endif
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
private object CreateDynamic(JsonReader reader, JsonDynamicContract contract, JsonProperty member, string id) private object CreateDynamic(JsonReader reader, JsonDynamicContract contract, JsonProperty member, string id)
{ {
IDynamicMetaObjectProvider newObject; IDynamicMetaObjectProvider newObject;
@@ -27,7 +27,7 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System.Dynamic; using System.Dynamic;
#endif #endif
using System.Diagnostics; using System.Diagnostics;
@@ -152,7 +152,7 @@ namespace Newtonsoft.Json.Serialization
JsonDictionaryContract dictionaryContract = (JsonDictionaryContract) valueContract; JsonDictionaryContract dictionaryContract = (JsonDictionaryContract) valueContract;
SerializeDictionary(writer, dictionaryContract.CreateWrapper(value), dictionaryContract, member, containerContract, containerProperty); SerializeDictionary(writer, dictionaryContract.CreateWrapper(value), dictionaryContract, member, containerContract, containerProperty);
break; break;
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
case JsonContractType.Dynamic: case JsonContractType.Dynamic:
SerializeDynamic(writer, (IDynamicMetaObjectProvider)value, (JsonDynamicContract)valueContract, member, containerContract, containerProperty); SerializeDynamic(writer, (IDynamicMetaObjectProvider)value, (JsonDynamicContract)valueContract, member, containerContract, containerProperty);
break; break;
@@ -710,7 +710,7 @@ To fix this error either change the environment to be fully trusted, change the
} }
#endif #endif
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
private void SerializeDynamic(JsonWriter writer, IDynamicMetaObjectProvider value, JsonDynamicContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) private void SerializeDynamic(JsonWriter writer, IDynamicMetaObjectProvider value, JsonDynamicContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
{ {
OnSerializing(writer, contract, value); OnSerializing(writer, contract, value);
@@ -224,7 +224,7 @@ namespace Newtonsoft.Json.Utilities
public static TimeSpan ParseTimeSpan(string input) public static TimeSpan ParseTimeSpan(string input)
{ {
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
return TimeSpan.Parse((string) input, CultureInfo.InvariantCulture); return TimeSpan.Parse((string) input, CultureInfo.InvariantCulture);
#else #else
return TimeSpan.Parse((string)input); return TimeSpan.Parse((string)input);
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE. // OTHER DEALINGS IN THE SOFTWARE.
#endregion #endregion
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Dynamic; using System.Dynamic;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE. // OTHER DEALINGS IN THE SOFTWARE.
#endregion #endregion
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Dynamic; using System.Dynamic;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE. // OTHER DEALINGS IN THE SOFTWARE.
#endregion #endregion
#if !(NET35 || NET20 || WINDOWS_PHONE) #if !(NET35 || NET20)
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Dynamic; using System.Dynamic;
@@ -44,7 +44,7 @@ namespace Newtonsoft.Json.Utilities
#if !SILVERLIGHT #if !SILVERLIGHT
public const string CSharpAssemblyName = "Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string CSharpAssemblyName = "Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
#else #else
public const string CSharpAssemblyName = "Microsoft.CSharp, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"; public const string CSharpAssemblyName = "Microsoft.CSharp, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
#endif #endif
private const string BinderTypeName = "Microsoft.CSharp.RuntimeBinder.Binder, " + CSharpAssemblyName; private const string BinderTypeName = "Microsoft.CSharp.RuntimeBinder.Binder, " + CSharpAssemblyName;