From fe7b7a6c7b0edfd071e5a1aa6b5f91a0b656d1ba Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Sun, 2 Aug 2015 23:56:26 +1200 Subject: [PATCH] -Added dotnet build -Removed WinRT files -Updated solution files to VS2015 -Updated psake --- .gitignore | 3 + Build/build.ps1 | 6 +- Src/Newtonsoft.Json.Dotnet.sln | 34 ++ Src/Newtonsoft.Json.Net20.sln | 4 +- Src/Newtonsoft.Json.Net35.sln | 5 +- Src/Newtonsoft.Json.Net40.sln | 4 +- Src/Newtonsoft.Json.Portable.sln | 4 +- Src/Newtonsoft.Json.Portable40.sln | 4 +- .../Properties/AssemblyInfo.cs | 2 +- .../Bson/BsonReaderTests.cs | 4 +- .../Bson/BsonWriterTests.cs | 4 +- .../Converters/BinaryConverterTests.cs | 8 +- .../DiscriminatedUnionConverterTests.cs | 2 +- .../Samples/Serializer/DefaultSettings.cs | 55 ++- .../Images/UnitTestLogo.png | Bin 5789 -> 0 bytes .../Images/UnitTestSmallLogo.png | Bin 745 -> 0 bytes .../Images/UnitTestSplashScreen.png | Bin 9381 -> 0 bytes .../Images/UnitTestStoreLogo.png | Bin 2005 -> 0 bytes Src/Newtonsoft.Json.Tests/JsonConvertTest.cs | 4 +- .../JsonTextReaderTest.cs | 6 +- .../JsonTextWriterTest.cs | 4 +- .../JsonValidatingReaderTests.cs | 6 +- .../Linq/AnnotationsTests.cs | 10 + .../Linq/DynamicTests.cs | 26 +- .../Linq/JObjectTests.cs | 4 +- Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs | 10 +- .../Linq/JTokenWriterTest.cs | 6 +- Src/Newtonsoft.Json.Tests/Linq/JValueTests.cs | 18 +- .../Newtonsoft.Json.Tests.WinRT.csproj | 402 ------------------ ...wtonsoft.Json.Tests.WinRT_TemporaryKey.pfx | Bin 2504 -> 0 bytes .../Package.appxmanifest | 29 -- .../Properties/AssemblyInfo.cs | 2 +- .../Schema/PerformanceTests.cs | 10 + ...lCasePropertyNamesContractResolverTests.cs | 2 +- .../Serialization/ContractResolverTests.cs | 17 +- .../JsonSerializerCollectionsTests.cs | 8 +- .../Serialization/JsonSerializerTest.cs | 34 +- .../Serialization/TraceWriterTests.cs | 4 +- Src/Newtonsoft.Json.Tests/TestFixtureBase.cs | 6 +- .../TestObjects/IMyInterface.cs | 9 +- .../TestObjects/ListOfIds.cs | 1 + .../Utilities/DateTimeUtilsTests.cs | 22 - Src/Newtonsoft.Json.Tests/project.json | 99 ++--- Src/Newtonsoft.Json.WinRT.sln | 65 --- Src/Newtonsoft.Json.sln | 4 +- Src/Newtonsoft.Json/Bson/BsonBinaryWriter.cs | 2 +- Src/Newtonsoft.Json/Bson/BsonReader.cs | 2 +- Src/Newtonsoft.Json/Bson/BsonWriter.cs | 2 +- .../Converters/BinaryConverter.cs | 2 +- .../Converters/CustomCreationConverter.cs | 1 + .../Converters/DataSetConverter.cs | 2 +- .../Converters/DataTableConverter.cs | 2 +- .../Converters/DiscriminatedUnionConverter.cs | 8 +- .../Converters/EntityKeyMemberConverter.cs | 2 +- .../Converters/XmlNodeConverter.cs | 11 +- Src/Newtonsoft.Json/FormatterAssemblyStyle.cs | 2 +- Src/Newtonsoft.Json/JsonConvert.cs | 6 +- Src/Newtonsoft.Json/JsonException.cs | 4 +- Src/Newtonsoft.Json/JsonReaderException.cs | 4 +- .../JsonSerializationException.cs | 4 +- Src/Newtonsoft.Json/JsonTextReader.cs | 4 +- Src/Newtonsoft.Json/JsonTextWriter.cs | 6 +- Src/Newtonsoft.Json/JsonWriter.cs | 4 +- Src/Newtonsoft.Json/JsonWriterException.cs | 4 +- Src/Newtonsoft.Json/Linq/JContainer.cs | 22 +- Src/Newtonsoft.Json/Linq/JObject.cs | 16 +- .../Linq/JPropertyDescriptor.cs | 2 +- Src/Newtonsoft.Json/Linq/JToken.cs | 4 +- Src/Newtonsoft.Json/Linq/JTokenWriter.cs | 2 +- Src/Newtonsoft.Json/Linq/JValue.cs | 15 +- .../Newtonsoft.Json.WinRT.csproj | 320 -------------- .../Properties/AssemblyInfo.cs | 6 +- .../Schema/JsonSchemaException.cs | 4 +- .../Schema/JsonSchemaGenerator.cs | 8 +- .../Serialization/DefaultContractResolver.cs | 54 ++- .../DefaultSerializationBinder.cs | 8 +- .../Serialization/DiagnosticsTraceWriter.cs | 2 +- .../Serialization/DynamicValueProvider.cs | 2 +- .../Serialization/JsonArrayContract.cs | 2 +- .../Serialization/JsonDictionaryContract.cs | 2 +- .../Serialization/JsonFormatterConverter.cs | 2 +- .../JsonISerializableContract.cs | 2 +- .../Serialization/JsonObjectContract.cs | 2 +- .../JsonSerializerInternalBase.cs | 5 - .../JsonSerializerInternalReader.cs | 8 +- .../JsonSerializerInternalWriter.cs | 18 +- .../Serialization/JsonTypeReflector.cs | 22 +- Src/Newtonsoft.Json/SerializationBinder.cs | 2 +- Src/Newtonsoft.Json/TraceLevel.cs | 2 +- Src/Newtonsoft.Json/Utilities/ConvertUtils.cs | 36 +- .../Utilities/DateTimeUtils.cs | 2 +- .../DynamicReflectionDelegateFactory.cs | 2 +- Src/Newtonsoft.Json/Utilities/FSharpUtils.cs | 4 +- .../Utilities/ILGeneratorExtensions.cs | 2 +- .../Utilities/ReflectionUtils.cs | 12 +- Src/Newtonsoft.Json/Utilities/StringUtils.cs | 2 +- .../Utilities/ThreadSafeStore.cs | 2 +- .../Utilities/TypeExtensions.cs | 83 ++-- Src/Newtonsoft.Json/project.json | 36 ++ Src/NuGet.Config | 3 +- Src/global.json | 6 + Tools/PSake/psake.psm1 | 13 +- 102 files changed, 507 insertions(+), 1247 deletions(-) create mode 100644 Src/Newtonsoft.Json.Dotnet.sln delete mode 100644 Src/Newtonsoft.Json.Tests/Images/UnitTestLogo.png delete mode 100644 Src/Newtonsoft.Json.Tests/Images/UnitTestSmallLogo.png delete mode 100644 Src/Newtonsoft.Json.Tests/Images/UnitTestSplashScreen.png delete mode 100644 Src/Newtonsoft.Json.Tests/Images/UnitTestStoreLogo.png delete mode 100644 Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj delete mode 100644 Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT_TemporaryKey.pfx delete mode 100644 Src/Newtonsoft.Json.Tests/Package.appxmanifest delete mode 100644 Src/Newtonsoft.Json.WinRT.sln delete mode 100644 Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj create mode 100644 Src/Newtonsoft.Json/project.json create mode 100644 Src/global.json diff --git a/.gitignore b/.gitignore index 71ed5b23..77d94f81 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ _ReSharper.* *.resharper.user project.lock.json *.xproj +.vs/ +*.props +*.targets #NuGet packages diff --git a/Build/build.ps1 b/Build/build.ps1 index a52875e0..34d1b2f1 100644 --- a/Build/build.ps1 +++ b/Build/build.ps1 @@ -1,8 +1,8 @@ properties { - $zipFileName = "Json70r1.zip" + $zipFileName = "Json70r2.zip" $majorVersion = "7.0" - $majorWithReleaseVersion = "7.0.1" - $nugetPrelease = $null + $majorWithReleaseVersion = "7.0.2" + $nugetPrelease = "beta1" $version = GetVersion $majorWithReleaseVersion $packageId = "Newtonsoft.Json" $signAssemblies = $false diff --git a/Src/Newtonsoft.Json.Dotnet.sln b/Src/Newtonsoft.Json.Dotnet.sln new file mode 100644 index 00000000..733e00dd --- /dev/null +++ b/Src/Newtonsoft.Json.Dotnet.sln @@ -0,0 +1,34 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B520C700-7D45-4D82-BFB5-218FA68CF5CF}" + ProjectSection(SolutionItems) = preProject + global.json = global.json + NuGet.Config = NuGet.Config + EndProjectSection +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Newtonsoft.Json.Dotnet", "Newtonsoft.Json\Newtonsoft.Json.Dotnet.xproj", "{2ACDB8C2-9BB8-4EB9-8D6A-4BB8CCF89377}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Newtonsoft.Json.Tests.Dotnet", "Newtonsoft.Json.Tests\Newtonsoft.Json.Tests.Dotnet.xproj", "{A1643B3F-D2C4-4312-AA04-07CF1B09A1E9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2ACDB8C2-9BB8-4EB9-8D6A-4BB8CCF89377}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2ACDB8C2-9BB8-4EB9-8D6A-4BB8CCF89377}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2ACDB8C2-9BB8-4EB9-8D6A-4BB8CCF89377}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2ACDB8C2-9BB8-4EB9-8D6A-4BB8CCF89377}.Release|Any CPU.Build.0 = Release|Any CPU + {A1643B3F-D2C4-4312-AA04-07CF1B09A1E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A1643B3F-D2C4-4312-AA04-07CF1B09A1E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A1643B3F-D2C4-4312-AA04-07CF1B09A1E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A1643B3F-D2C4-4312-AA04-07CF1B09A1E9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Src/Newtonsoft.Json.Net20.sln b/Src/Newtonsoft.Json.Net20.sln index 06603606..ebb76225 100644 --- a/Src/Newtonsoft.Json.Net20.sln +++ b/Src/Newtonsoft.Json.Net20.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Net20", "Newtonsoft.Json\Newtonsoft.Json.Net20.csproj", "{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}" EndProject diff --git a/Src/Newtonsoft.Json.Net35.sln b/Src/Newtonsoft.Json.Net35.sln index f14f68c0..eb7de416 100644 --- a/Src/Newtonsoft.Json.Net35.sln +++ b/Src/Newtonsoft.Json.Net35.sln @@ -1,7 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30324.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Net35", "Newtonsoft.Json\Newtonsoft.Json.Net35.csproj", "{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Tests.Net35", "Newtonsoft.Json.Tests\Newtonsoft.Json.Tests.Net35.csproj", "{3E6E2335-B079-4B5B-A65A-9D586914BCBB}" diff --git a/Src/Newtonsoft.Json.Net40.sln b/Src/Newtonsoft.Json.Net40.sln index 1b09e98d..5af5dcbc 100644 --- a/Src/Newtonsoft.Json.Net40.sln +++ b/Src/Newtonsoft.Json.Net40.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Net40", "Newtonsoft.Json\Newtonsoft.Json.Net40.csproj", "{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}" EndProject diff --git a/Src/Newtonsoft.Json.Portable.sln b/Src/Newtonsoft.Json.Portable.sln index ef75c820..21705b08 100644 --- a/Src/Newtonsoft.Json.Portable.sln +++ b/Src/Newtonsoft.Json.Portable.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Portable", "Newtonsoft.Json\Newtonsoft.Json.Portable.csproj", "{959F7F85-C98B-4876-971A-9036224578E4}" EndProject diff --git a/Src/Newtonsoft.Json.Portable40.sln b/Src/Newtonsoft.Json.Portable40.sln index 37e89da6..0529cddc 100644 --- a/Src/Newtonsoft.Json.Portable40.sln +++ b/Src/Newtonsoft.Json.Portable40.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Portable40", "Newtonsoft.Json\Newtonsoft.Json.Portable40.csproj", "{959F7F85-C98B-4876-971A-9036224578E4}" EndProject diff --git a/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs index 6e080d9b..0e0a3394 100644 --- a/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs @@ -57,4 +57,4 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("7.0.0.0")] -[assembly: AssemblyFileVersion("7.0.1.18621")] +[assembly: AssemblyFileVersion("7.0.2.18802")] diff --git a/Src/Newtonsoft.Json.Tests/Bson/BsonReaderTests.cs b/Src/Newtonsoft.Json.Tests/Bson/BsonReaderTests.cs index d0085bd0..bf740f15 100644 --- a/Src/Newtonsoft.Json.Tests/Bson/BsonReaderTests.cs +++ b/Src/Newtonsoft.Json.Tests/Bson/BsonReaderTests.cs @@ -30,7 +30,7 @@ using System.Reflection; using System.Runtime.Serialization; using Newtonsoft.Json.Serialization; using Newtonsoft.Json.Tests.TestObjects; -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) using System.Numerics; #endif using System.Text; @@ -1506,7 +1506,7 @@ namespace Newtonsoft.Json.Tests.Bson } #endif -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) public class BigIntegerTestClass { public BigInteger Blah { get; set; } diff --git a/Src/Newtonsoft.Json.Tests/Bson/BsonWriterTests.cs b/Src/Newtonsoft.Json.Tests/Bson/BsonWriterTests.cs index 898e8e1c..ebfeed01 100644 --- a/Src/Newtonsoft.Json.Tests/Bson/BsonWriterTests.cs +++ b/Src/Newtonsoft.Json.Tests/Bson/BsonWriterTests.cs @@ -25,7 +25,7 @@ using System; using System.Collections.Generic; -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) using System.Numerics; #endif using System.Text; @@ -803,7 +803,7 @@ namespace Newtonsoft.Json.Tests.Bson Assert.AreEqual(c.AGuid, c2.AGuid.ToString()); } -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) [Test] public void WriteBigInteger() { diff --git a/Src/Newtonsoft.Json.Tests/Converters/BinaryConverterTests.cs b/Src/Newtonsoft.Json.Tests/Converters/BinaryConverterTests.cs index 5c6b156f..a33e6ce9 100644 --- a/Src/Newtonsoft.Json.Tests/Converters/BinaryConverterTests.cs +++ b/Src/Newtonsoft.Json.Tests/Converters/BinaryConverterTests.cs @@ -25,10 +25,10 @@ using System; using System.Collections.Generic; -#if !(NET20 || NETFX_CORE || DNXCORE50) +#if !(NET20 || DNXCORE50) using System.Data.Linq; #endif -#if !(NETFX_CORE || DNXCORE50) +#if !DNXCORE50 using System.Data.SqlTypes; #endif using System.Text; @@ -58,7 +58,7 @@ namespace Newtonsoft.Json.Tests.Converters public byte[] NullByteArray { get; set; } } -#if !(NET20 || NETFX_CORE || PORTABLE || PORTABLE40 || DNXCORE50) +#if !(NET20 || PORTABLE || PORTABLE40 || DNXCORE50) [Test] public void DeserializeBinaryClass() { @@ -124,7 +124,7 @@ namespace Newtonsoft.Json.Tests.Converters }", json); } -#if !(NETFX_CORE || PORTABLE || PORTABLE40 || DNXCORE50) +#if !(PORTABLE || PORTABLE40 || DNXCORE50) public class SqlBinaryClass { public SqlBinary SqlBinary { get; set; } diff --git a/Src/Newtonsoft.Json.Tests/Converters/DiscriminatedUnionConverterTests.cs b/Src/Newtonsoft.Json.Tests/Converters/DiscriminatedUnionConverterTests.cs index 1d12cbfa..f422a2a5 100644 --- a/Src/Newtonsoft.Json.Tests/Converters/DiscriminatedUnionConverterTests.cs +++ b/Src/Newtonsoft.Json.Tests/Converters/DiscriminatedUnionConverterTests.cs @@ -23,7 +23,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -#if !(NET35 || NET20 || NETFX_CORE || DNXCORE50) +#if !(NET35 || NET20 || DNXCORE50) using System.Diagnostics; using System.Reflection; using Microsoft.FSharp.Core; diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Serializer/DefaultSettings.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Serializer/DefaultSettings.cs index efccf0fe..87f9c114 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Serializer/DefaultSettings.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Serializer/DefaultSettings.cs @@ -44,32 +44,41 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Serializer [Test] public void Example() { - #region Usage - // settings will automatically be used by JsonConvert.SerializeObject/DeserializeObject - JsonConvert.DefaultSettings = () => new JsonSerializerSettings - { - Formatting = Formatting.Indented, - ContractResolver = new CamelCasePropertyNamesContractResolver() - }; + string json; - Staff s = new Staff + try { - FirstName = "Eric", - LastName = "Example", - BirthDate = new DateTime(1980, 4, 20, 0, 0, 0, DateTimeKind.Utc), - Department = "IT", - JobTitle = "Web Dude" - }; + #region Usage + // settings will automatically be used by JsonConvert.SerializeObject/DeserializeObject + JsonConvert.DefaultSettings = () => new JsonSerializerSettings + { + Formatting = Formatting.Indented, + ContractResolver = new CamelCasePropertyNamesContractResolver() + }; - string json = JsonConvert.SerializeObject(s); - // { - // "firstName": "Eric", - // "lastName": "Example", - // "birthDate": "1980-04-20T00:00:00Z", - // "department": "IT", - // "jobTitle": "Web Dude" - // } - #endregion + Staff s = new Staff + { + FirstName = "Eric", + LastName = "Example", + BirthDate = new DateTime(1980, 4, 20, 0, 0, 0, DateTimeKind.Utc), + Department = "IT", + JobTitle = "Web Dude" + }; + + json = JsonConvert.SerializeObject(s); + // { + // "firstName": "Eric", + // "lastName": "Example", + // "birthDate": "1980-04-20T00:00:00Z", + // "department": "IT", + // "jobTitle": "Web Dude" + // } + #endregion + } + finally + { + JsonConvert.DefaultSettings = null; + } StringAssert.AreEqual(@"{ ""firstName"": ""Eric"", diff --git a/Src/Newtonsoft.Json.Tests/Images/UnitTestLogo.png b/Src/Newtonsoft.Json.Tests/Images/UnitTestLogo.png deleted file mode 100644 index ebd735aa9352cf97bfcbe11dc4281617d570dca4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5789 zcmbVQhdons_quWX^nDTL^UGD1W-M)v9$NwN~MJA93- zj3}e~I=}n-2kt$ObDYQdIOqL&yFDB;YCRff7OZo zzr!1qpV5s#A|g5*;YHl%`^uGw2w`EYuVWLIx0&x{nmcjY*YQqvGKXl5Xzbvu`hN-~3vVQfC}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(hO3mo$T3=fZp_&IWgN2kj6fdVgmDemFJhiMZ$r_oyb;TrqlQ6Dx*SBAh* zI?J>BZ%ks%LZ=8)-AE8{1;dnbt%0ySQ?e_LRv+Y|JUgwFV{6j<-?PJ`iHSF%(#W@89`-=G(daBdo2h3GD{t?iju%R99D5 z$uSAaORwC9AJC+tMl|bVu+Rrk&$F|$s~a1bew}Yn5Dg6tKHAFoF*fpe zz6!-zA0?o3U^T*SPmcTn3w^7iq_WQgyO-NEZ(dMOCULPUG!>3mSLb>=kus!tOyk>j zfS9|x!bL+v)4dV&>t=&bVqMzCLHNkn*o9g$Z=klA6FiS{%$d68*%7|%S0HOj560vH zW(^B&AM`14<>!L=_9(E4TwzB$eD+e;O{XujKMFfJk_Ad=T&pwO$*i&5BFCXXZ^QI} zc8?$N(1+Px3Q!3M3@o$}Pk;IpaTt#ih+{;Tl$7Ye&P7Bh*dLKQI5@0sZQX|xDOWvN z2p3|5vnkK92l6M;S_JQW`I+c#r`O}?fB+_#Dlpmv4ly>S>PE}LztMBhh4+EgmT-Ep^8Qt%kG|H*?Trfn$P( zSLUSS)Qn{FY2dJzQd%^(Idx*=dkQWNeCqyw(9Ank`x`g9s%|#ye3BcgyfCnRSlrRU z17`zL*rU^EWR-2?Zoi0;v2kJ4>rG4NZim9LHDEiNnb5y&QOCdTw-tj;7|d0|pAo}& zgMCuxGcTW~GfXmIh1lcc<1MI|DM=SXT3n))8pn9ice*})r1qI<#F|&Ow`)Qd4zu0( zuGjtTey)6#s=p4Z*-mS{SQ;;^yL5m diff --git a/Src/Newtonsoft.Json.Tests/Images/UnitTestSmallLogo.png b/Src/Newtonsoft.Json.Tests/Images/UnitTestSmallLogo.png deleted file mode 100644 index 92dd1058fbfb70c4491d934fe5f60ff2bacd41e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 745 zcmVGVQpR4ciyoglSwB91#GhGhn{+`40 zKOYZLtJUy5M#Hz+??BTuEf5G^US9q^+F&rqWU^c?_f@o5EFKPriyn{1Bb7>Dq2Gpm zj6OIx0Dx2~HJwfYfY0ae?(T|2B8f!u{QL|62qB-(r&KC$Z*SK_*J?F}VN52|>FMcU zFfbSl3WWjytX69-my^roXJ=<#ua{)79{TC&>GAP#Z*OmVdpj13x!rDr5V@9aw;PYg zH#axi?RKlx`izXlVo|Hrs#L0EGRd+maoTJ)o6W}O^8uh-F3h|y@YSS;jQC=}8(jWHGo1n>Siolbo|pUdSMkH^GQuh+}v@;m@7 z&Jc>C4i68Hj*hr+T!t~ezP`S?y22R0k0z$q>n|=YHa0d^OdOHmY;9-&aER;zuc8|`*G;bM$g zmK6$x05F+MNKYb!91h14^s=n;`Mg%E?Q}Y^Sj_A71_A*9C=?2bL}EUktX3=67~#xX zqtR?_Z50ZIlarIdV8G+?{C+<<@8RKLe}A70Rh>@PY&O@+Iv5NhgzoO{=BuF5Xoy6j zot>Spu7XS^v$&ZilS!#ml1in7OJvMsGGeiKZ5iKgy!-omnN0R!*h(_~++zV_yx462 b>BH;~a9|}kOw?>(00000NkvXXu0mjfaI93Z diff --git a/Src/Newtonsoft.Json.Tests/Images/UnitTestSplashScreen.png b/Src/Newtonsoft.Json.Tests/Images/UnitTestSplashScreen.png deleted file mode 100644 index 193187f108f50dd242cb5c589b02a29691b7432a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9381 zcmeHs_dDBt)PI_yHA>VTRkZe|wPy)R?Y(D>nzd(8MXaJ~uc9_FOYOTxRcpoGYExp@ zitu$y`dr^X;d!p>{^4^a`Mk$D=XGA^^&W{-S5>%&M~w#n0Pa0kl+y$NfQ|sbEzY|* z*KZ(9yQ9}1Shg}MG5|pJy8xs{;`MKOD@9Ee03d=00EoGMP}hS(qyd0HUjSe;8UPSq z1puh}+{MGZ0RTJ^ds$g^bvqXi7k4`sSNi9&vh=QQE;ja#F986>o~&eVZS4v2h{0BG zzubOapl0}d^FM%L|3p);MJkm!>uo}TC)EsjKw_|5I-{a`S1?@tv94S-h*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cu!;rGgwD|GJMxj#1i#xz8wQlY7- zDd~h53u-o-4NsmtK~GPQzogz7j|hSQlgR{=$pl%JF+M*2YtpY21?lPOC@LySNa4A; zIsE+j6TvA;aI37W#M06d`uqE%vU}8|adUGM6B84dnVIp2Qwnx`j^n@>V+{=rbo=)0 zgp$S=FJ7Rdqk{n;pU(%M&le&_MC9>!V){zdq|xW|VR3PB+f%^S*4BiRMx9QFj~_qA zTaWDh0o{QE2T)a2m9Q@yJ9Z2@oeon|Q~P^B=ZBZcWMXQyI)tTnQ|hWzD%8}}Fo(mj z|D`U+aj34Yrj(QvKNQL7bYgID5LT;|u3x{7>gsB692a2f$;nBywY5=IRTUZ<8jzct zOB~06=Xsb+ChF+ufFw!#Tk7WIC>kW1tumYFgG`cf`S4t#;~}!7{W!eEMs(Z6!Y`*f!#3}4Cv|U zf!pogA49UUv*C8T@!-J&3=IuMWZdQDWsHxH!(cFg=XrYn{yi2J7JiePpP$F$$B!{R zJ&m%mGUVsy?<#uj>VPizT0xfONOc1PKt`hxj~+dOLZM)H@7|?n&z}8R*9vQEYgk)b zi&euA08CC!!r^d0tyWXexo*TcvMiI+>HKF7=(cNaw;KZk1IWqA!SeEQQWMOi-yvG9 zR%o@_q~0G!@{y==_`hFI6A|JtBB6Ke1X_uH!V!<$zv2@P{3$z new BigInteger(0)); #endif @@ -304,11 +304,11 @@ namespace Newtonsoft.Json.Tests.Linq Assert.IsTrue(d.Float == 1.1m); Assert.IsTrue(d.Float != 1.0f); Assert.IsTrue(d.Float != 1.0d); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) Assert.IsTrue(d.Float > new BigInteger(0)); #endif -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) Assert.IsTrue(d.BigInteger == d.BigInteger); Assert.IsTrue(d.BigInteger > 0); Assert.IsTrue(d.BigInteger > 0.0m); @@ -364,7 +364,7 @@ namespace Newtonsoft.Json.Tests.Linq new JProperty("Uri", new Uri("http://json.codeplex.com/")), new JProperty("Guid", new Guid("EA27FE1D-0D80-44F2-BF34-4654156FA7AF")), new JProperty("TimeSpan", TimeSpan.FromDays(1)) -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) , new JProperty("BigInteger", new BigInteger(100)) #endif ); @@ -443,7 +443,7 @@ namespace Newtonsoft.Json.Tests.Linq r += 2; Assert.AreEqual(null, r.Value); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) r = d.BigInteger + null; Assert.AreEqual(null, r.Value); r += 2; @@ -522,7 +522,7 @@ namespace Newtonsoft.Json.Tests.Linq r -= 2; Assert.AreEqual(null, r.Value); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) r = d.BigInteger - null; Assert.AreEqual(null, r.Value); r -= 2; @@ -596,7 +596,7 @@ namespace Newtonsoft.Json.Tests.Linq r *= 2; Assert.AreEqual(null, r.Value); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) r = d.BigInteger * 1.1d; Assert.AreEqual(100m, (decimal)r); r *= 2; @@ -670,7 +670,7 @@ namespace Newtonsoft.Json.Tests.Linq r /= 2; Assert.AreEqual(null, r.Value); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) r = d.BigInteger / 1.1d; Assert.AreEqual(100m, (decimal)r); r /= 2; @@ -698,7 +698,7 @@ namespace Newtonsoft.Json.Tests.Linq new JProperty("Uri", new Uri("http://json.codeplex.com/")), new JProperty("Guid", new Guid("EA27FE1D-0D80-44F2-BF34-4654156FA7AF")), new JProperty("TimeSpan", TimeSpan.FromDays(1)) -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) , new JProperty("BigInteger", new BigInteger(100)) #endif ); @@ -715,7 +715,7 @@ namespace Newtonsoft.Json.Tests.Linq Assert.AreEqual("http://json.codeplex.com/", d.Uri.ToString()); Assert.AreEqual("ea27fe1d-0d80-44f2-bf34-4654156fa7af", d.Guid.ToString()); Assert.AreEqual("1.00:00:00", d.TimeSpan.ToString()); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) Assert.AreEqual("100", d.BigInteger.ToString()); #endif } @@ -799,7 +799,7 @@ namespace Newtonsoft.Json.Tests.Linq AssertValueConverted(null); AssertValueConverted(new Uri("http://json.codeplex.com/")); AssertValueConverted(null); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) AssertValueConverted(new BigInteger(100)); AssertValueConverted(null); #endif diff --git a/Src/Newtonsoft.Json.Tests/Linq/JObjectTests.cs b/Src/Newtonsoft.Json.Tests/Linq/JObjectTests.cs index 98555a04..d39e5dd7 100644 --- a/Src/Newtonsoft.Json.Tests/Linq/JObjectTests.cs +++ b/Src/Newtonsoft.Json.Tests/Linq/JObjectTests.cs @@ -27,7 +27,7 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) using System.Numerics; #endif using Newtonsoft.Json.Serialization; @@ -717,7 +717,7 @@ Parameter name: arrayIndex"); Assert.AreEqual(p4, l[1]); } -#if !(NET20 || NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || PORTABLE || PORTABLE40) [Test] public void PropertyChanging() { diff --git a/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs b/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs index d048bae2..ddcc44b2 100644 --- a/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs +++ b/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs @@ -25,7 +25,7 @@ using System; using System.Collections.Generic; -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) using System.Numerics; #endif using System.Text; @@ -361,7 +361,7 @@ namespace Newtonsoft.Json.Tests.Linq Assert.AreEqual(5, (int)(new JValue(StringComparison.OrdinalIgnoreCase))); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) string bigIntegerText = "1234567899999999999999999999999999999999999999999999999999999999999990"; Assert.AreEqual(BigInteger.Parse(bigIntegerText), (new JValue(BigInteger.Parse(bigIntegerText))).Value); @@ -441,7 +441,7 @@ namespace Newtonsoft.Json.Tests.Linq #endif ExceptionAssert.Throws(() => { var i = (Uri)new JValue(true); }, "Can not convert Boolean to Uri."); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) ExceptionAssert.Throws(() => { var i = (new JValue(new Uri("http://www.google.com"))).ToObject(); }, "Can not convert Uri to BigInteger."); ExceptionAssert.Throws(() => { var i = (JValue.CreateNull()).ToObject(); }, "Can not convert Null to BigInteger."); ExceptionAssert.Throws(() => { var i = (new JValue(Guid.NewGuid())).ToObject(); }, "Can not convert Guid to BigInteger."); @@ -458,7 +458,7 @@ namespace Newtonsoft.Json.Tests.Linq [Test] public void ToObject() { -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) Assert.AreEqual((BigInteger)1, (new JValue(1).ToObject(typeof(BigInteger)))); Assert.AreEqual((BigInteger)1, (new JValue(1).ToObject(typeof(BigInteger?)))); Assert.AreEqual((BigInteger?)null, (JValue.CreateNull().ToObject(typeof(BigInteger?)))); @@ -515,7 +515,7 @@ namespace Newtonsoft.Json.Tests.Linq Assert.IsTrue(JToken.DeepEquals(new JValue((DateTimeOffset?)null), (JValue)(DateTimeOffset?)null)); #endif -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) // had to remove implicit casting to avoid user reference to System.Numerics.dll Assert.IsTrue(JToken.DeepEquals(new JValue(new BigInteger(1)), new JValue(new BigInteger(1)))); Assert.IsTrue(JToken.DeepEquals(new JValue((BigInteger?)null), new JValue((BigInteger?)null))); diff --git a/Src/Newtonsoft.Json.Tests/Linq/JTokenWriterTest.cs b/Src/Newtonsoft.Json.Tests/Linq/JTokenWriterTest.cs index 98ac87d5..a32d55c1 100644 --- a/Src/Newtonsoft.Json.Tests/Linq/JTokenWriterTest.cs +++ b/Src/Newtonsoft.Json.Tests/Linq/JTokenWriterTest.cs @@ -124,7 +124,7 @@ namespace Newtonsoft.Json.Tests.Linq jsonWriter.WriteValue("DVD read/writer"); Assert.AreEqual(WriteState.Array, jsonWriter.WriteState); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) jsonWriter.WriteValue(new BigInteger(123)); Assert.AreEqual(WriteState.Array, jsonWriter.WriteState); #endif @@ -176,7 +176,7 @@ namespace Newtonsoft.Json.Tests.Linq Assert.AreEqual(WriteState.Array, jsonWriter.WriteState); Assert.AreEqual(a[a.Count - 1], jsonWriter.CurrentToken); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) jsonWriter.WriteValue(new BigInteger(123)); Assert.AreEqual(WriteState.Array, jsonWriter.WriteState); Assert.AreEqual(a[a.Count - 1], jsonWriter.CurrentToken); @@ -209,7 +209,7 @@ namespace Newtonsoft.Json.Tests.Linq /*fail*/]", writer.Token.ToString()); } -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) [Test] public void WriteBigInteger() { diff --git a/Src/Newtonsoft.Json.Tests/Linq/JValueTests.cs b/Src/Newtonsoft.Json.Tests/Linq/JValueTests.cs index 5b3a8644..25fbcf87 100644 --- a/Src/Newtonsoft.Json.Tests/Linq/JValueTests.cs +++ b/Src/Newtonsoft.Json.Tests/Linq/JValueTests.cs @@ -28,7 +28,7 @@ using System.Collections.Generic; using System.IO; using System.Runtime.Serialization; using Newtonsoft.Json.Tests.TestObjects; -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) using System.Numerics; #endif using System.Text; @@ -158,7 +158,7 @@ namespace Newtonsoft.Json.Tests.Linq Assert.AreEqual(g, v.Value); Assert.AreEqual(JTokenType.Guid, v.Type); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) BigInteger i = BigInteger.Parse("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990"); v.Value = i; Assert.AreEqual(i, v.Value); @@ -218,13 +218,13 @@ namespace Newtonsoft.Json.Tests.Linq v = new JValue(new Guid("B282ADE7-C520-496C-A448-4084F6803DE5")); Assert.AreEqual("b282ade7-c520-496c-a448-4084f6803de5", v.ToString(null, CultureInfo.InvariantCulture)); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) v = new JValue(BigInteger.Parse("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990")); Assert.AreEqual("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990", v.ToString(null, CultureInfo.InvariantCulture)); #endif } -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) [Test] public void JValueParse() { @@ -473,7 +473,7 @@ namespace Newtonsoft.Json.Tests.Linq } #endif -#if !(NETFX_CORE || PORTABLE || DNXCORE50) +#if !(NETFX_CORE || PORTABLE) [Test] public void ConvertsToBoolean() { @@ -492,7 +492,7 @@ namespace Newtonsoft.Json.Tests.Linq Assert.AreEqual(Int32.MaxValue, Convert.ToInt32(new JValue(Int32.MaxValue))); } -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) [Test] public void ConvertsToInt32_BigInteger() { @@ -654,7 +654,7 @@ namespace Newtonsoft.Json.Tests.Linq v = new JValue(new Uri("http://www.google.com")); Assert.AreEqual(TypeCode.Object, v.GetTypeCode()); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) v = new JValue(new BigInteger(3)); Assert.AreEqual(TypeCode.Object, v.GetTypeCode()); #endif @@ -668,7 +668,7 @@ namespace Newtonsoft.Json.Tests.Linq int i = (int)v.ToType(typeof(int), CultureInfo.InvariantCulture); Assert.AreEqual(9, i); -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) BigInteger bi = (BigInteger)v.ToType(typeof(BigInteger), CultureInfo.InvariantCulture); Assert.AreEqual(new BigInteger(9), bi); #endif @@ -683,7 +683,7 @@ namespace Newtonsoft.Json.Tests.Linq Assert.AreEqual("2013", v.ToString("yyyy")); } -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) [Test] public void ToStringNewTypes() { diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj deleted file mode 100644 index 0853b2e3..00000000 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj +++ /dev/null @@ -1,402 +0,0 @@ - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B} - Library - Properties - Newtonsoft.Json.Tests - Newtonsoft.Json.Tests - en-US - 512 - {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Newtonsoft.Json.Tests.WinRT_TemporaryKey.pfx - 3116117C65F73A227A0BDC35F584F04145BA4BB7 - False - - - true - full - false - bin\Debug\WinRT\ - DEBUG;TRACE;NETFX_CORE - prompt - 4 - - - pdbonly - true - bin\Release\WinRT\ - TRACE;NETFX_CORE - prompt - 4 - - - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE - ;2008 - full - ARM - false - prompt - ExpressRules.ruleset - true - - - bin\ARM\Release\ - TRACE;NETFX_CORE - true - ;2008 - pdbonly - ARM - false - prompt - ExpressRules.ruleset - true - - - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE - ;2008 - full - x64 - false - prompt - ExpressRules.ruleset - true - - - bin\x64\Release\ - TRACE;NETFX_CORE - true - ;2008 - pdbonly - x64 - false - prompt - ExpressRules.ruleset - true - - - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE - ;2008 - full - x86 - false - prompt - ExpressRules.ruleset - true - - - bin\x86\Release\ - TRACE;NETFX_CORE - true - ;2008 - pdbonly - x86 - false - prompt - ExpressRules.ruleset - true - - - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - {263136a2-b89b-424e-a87a-f988caa8d032} - Newtonsoft.Json.WinRT - - - - - PreserveNewest - - - - PreserveNewest - - - - - ..\packages\System.Collections.Immutable.1.1.33-beta\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - - 12.0 - - - - \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT_TemporaryKey.pfx b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT_TemporaryKey.pfx deleted file mode 100644 index 4edf74d9698a51a85109176afd97b840ba68a6e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2504 zcmY+Edpy(oAIHCAHe>F$AvO{rY#4Ki2nQLW5j)6OE{P?fS)jn~9w&YocPn7Sy5^5gga6oMf*x^S1>i4W*IKGiqvR% z!_(|zM`Gq~y3#4;K>V=ntzH+`m9)*;PH!O!wuM>ceT1rrXIrd{QS_#1YsMX~DEhcu z&bu|6JZD!{vrv}a0q&}Dk29pfZ3%6=UgPR7m2QqpL{OjT2BbILo6b~)W{AM7Cb+WC z#cQ0Mbxh?r;Wl=*;-%**u(QIm*c?Lx4jcODh~J(+k;?&s*2qw&<0ktK59B}%^TXr3 zl@etm&L+LOY&qaH2jN_8(|#i;S2>JqrAOW<=FhM4&vRJUWeM~_oj0gu+pC$24i*82 zWNXKC!wP%X8~GPK;CF4(vK7ANrT}*^54&Hsewba1kbX3hyB5rRpzW&Z|p!gM5>dO>w4*Z<7XSWWV0qzosgU~PBfX?F7l+vgYC zm{oSx6Z?{iN$o`G<&j9;>8(eiX*~<)!V#FQgH4>(`0;4I%2+KS4c?)Hli!(S;7H*0@OdR=%TFY6Q-Zor zVmE2T>5-Z4)-LBF+~sRpuFe^bkNpfZ{{(93Q3dIexw+DU0AdLN9y`3HUt^RY+R(RS5k;h<{{5#V(RjrF(J)JxZB6BtRT>pk#P-a?v(*3)#rrh>EMJm zWBRhpq(^tYx9}t;&Z6+r;BH4!E~#u8e>`fxY#+A3cgIg#Z1B0-P-lopn79mHYaSiq zpwWiU@Yr8z($z7D6D)I|LZ?N!1kie{t3dHR!LhG5H3gT^zFJ|vFI9i*gSXz(o|D$J zS644vkU=g6007o79#&r6^t%Ssv$b5@#L6HpGMLFCNYP@`$KgI9?x{7;8lU#%XL|vt zpojV2o5%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7X1k)(Mo;!gFV4fE6zpZK9vrnGtX*uqz@ zlUg~(ZDAw5u-Sog87=QL8{77He2t=h9H?Y zpMwO?w{eG!kq=U*P@+3HLEKi_ZnT&B(#8$S6KU41Pksg8@pfnDT;YNcH_tL11N@W| zJ!ThehDM^H5CLsbem(`T^Z|aRHCKRprt8*6Zl`WT-C;AxC9w4M8Xw~M!1hT+6Q7G? TnMd}( - - - - Newtonsoft.Json.Tests.WinRT - James - Images\UnitTestStoreLogo.png - Newtonsoft.Json.Tests.WinRT - - - 6.2 - 6.2 - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs index 7968f7e4..eb7a3cdc 100644 --- a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs @@ -76,4 +76,4 @@ using System.Security; // by using the '*' as shown below: [assembly: AssemblyVersion("7.0.0.0")] -[assembly: AssemblyFileVersion("7.0.1.18621")] +[assembly: AssemblyFileVersion("7.0.2.18802")] diff --git a/Src/Newtonsoft.Json.Tests/Schema/PerformanceTests.cs b/Src/Newtonsoft.Json.Tests/Schema/PerformanceTests.cs index b783fe4b..246b2b22 100644 --- a/Src/Newtonsoft.Json.Tests/Schema/PerformanceTests.cs +++ b/Src/Newtonsoft.Json.Tests/Schema/PerformanceTests.cs @@ -32,7 +32,17 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json.Schema; +#if NETFX_CORE +using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; +using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +#elif DNXCORE50 +using Xunit; +using Test = Xunit.FactAttribute; +using Assert = Newtonsoft.Json.Tests.XUnitAssert; +#else using NUnit.Framework; +#endif namespace Newtonsoft.Json.Tests.Schema { diff --git a/Src/Newtonsoft.Json.Tests/Serialization/CamelCasePropertyNamesContractResolverTests.cs b/Src/Newtonsoft.Json.Tests/Serialization/CamelCasePropertyNamesContractResolverTests.cs index 6ce098f4..0efad3e6 100644 --- a/Src/Newtonsoft.Json.Tests/Serialization/CamelCasePropertyNamesContractResolverTests.cs +++ b/Src/Newtonsoft.Json.Tests/Serialization/CamelCasePropertyNamesContractResolverTests.cs @@ -105,7 +105,7 @@ namespace Newtonsoft.Json.Tests.Serialization string json = o.ToString(); } -#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NETFX_CORE || PORTABLE || PORTABLE40) #pragma warning disable 618 [Test] public void MemberSearchFlags() diff --git a/Src/Newtonsoft.Json.Tests/Serialization/ContractResolverTests.cs b/Src/Newtonsoft.Json.Tests/Serialization/ContractResolverTests.cs index e5893728..6aeae522 100644 --- a/Src/Newtonsoft.Json.Tests/Serialization/ContractResolverTests.cs +++ b/Src/Newtonsoft.Json.Tests/Serialization/ContractResolverTests.cs @@ -49,6 +49,7 @@ using Newtonsoft.Json.Tests.TestObjects; using System.Reflection; using Newtonsoft.Json.Utilities; using System.Globalization; +using Newtonsoft.Json.Linq; namespace Newtonsoft.Json.Tests.Serialization { @@ -565,7 +566,7 @@ namespace Newtonsoft.Json.Tests.Serialization }", startingWithB); } -#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NETFX_CORE || PORTABLE || PORTABLE40) #pragma warning disable 618 [Test] public void SerializeCompilerGeneratedMembers() @@ -602,14 +603,12 @@ namespace Newtonsoft.Json.Tests.Serialization string includeCompilerGeneratedJson = JsonConvert.SerializeObject(structTest, Formatting.Indented, new JsonSerializerSettings { ContractResolver = includeCompilerGeneratedResolver }); - StringAssert.AreEqual(@"{ - ""StringField"": ""Field"", - ""IntField"": 1, - ""k__BackingField"": ""Property"", - ""k__BackingField"": 2, - ""StringProperty"": ""Property"", - ""IntProperty"": 2 -}", includeCompilerGeneratedJson); + JObject o = JObject.Parse(includeCompilerGeneratedJson); + + Console.WriteLine(includeCompilerGeneratedJson); + + Assert.AreEqual("Property", (string)o["k__BackingField"]); + Assert.AreEqual(2, (int)o["k__BackingField"]); } #pragma warning restore 618 #endif diff --git a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerCollectionsTests.cs b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerCollectionsTests.cs index ce4125d2..369c0fb9 100644 --- a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerCollectionsTests.cs +++ b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerCollectionsTests.cs @@ -27,7 +27,7 @@ using System; using System.Collections; using System.Collections.Specialized; using System.Runtime.Serialization; -#if !(NET35 || NET20 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET35 || NET20 || PORTABLE || PORTABLE40) using System.Collections.Concurrent; #endif using System.Collections.Generic; @@ -59,7 +59,7 @@ namespace Newtonsoft.Json.Tests.Serialization [TestFixture] public class JsonSerializerCollectionsTests : TestFixtureBase { -#if !NETFX_CORE +#if !(NETFX_CORE || DNXCORE50) public class NameValueCollectionTestClass { public NameValueCollection Collection { get; set; } @@ -715,7 +715,7 @@ namespace Newtonsoft.Json.Tests.Serialization Assert.AreEqual(3, v2["Third"]); } -#if !(NET35 || NET20 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET35 || NET20 || PORTABLE || PORTABLE40) [Test] public void DeserializeConcurrentDictionary() { @@ -1659,6 +1659,7 @@ namespace Newtonsoft.Json.Tests.Serialization } #endif +#if !DNXCORE50 [Test] public void EmptyStringInHashtableIsDeserialized() { @@ -1671,6 +1672,7 @@ namespace Newtonsoft.Json.Tests.Serialization Assert.AreEqual(deserializeTest2["testkey"], ""); } +#endif } #if !(NET40 || NET35 || NET20 || PORTABLE40) diff --git a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs index b77d9f49..7f11634e 100644 --- a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs +++ b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs @@ -29,7 +29,7 @@ using System.ComponentModel; using System.Collections.Concurrent; #endif using System.Collections.Generic; -#if !(NET20 || NET35 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE) using System.Numerics; #endif #if !(NET20 || NETFX_CORE || DNXCORE50) @@ -59,6 +59,7 @@ using System.Collections; using System.Xml; using System.Xml.Serialization; using System.Collections.ObjectModel; +using System.Diagnostics; using Newtonsoft.Json.Bson; using Newtonsoft.Json.Linq; using Newtonsoft.Json.Converters; @@ -87,7 +88,6 @@ using System.Linq; #endif #if !(NETFX_CORE || DNXCORE50) using System.Drawing; -using System.Diagnostics; #endif namespace Newtonsoft.Json.Tests.Serialization @@ -158,7 +158,11 @@ namespace Newtonsoft.Json.Tests.Serialization protected override string ResolvePropertyName(string propertyName) { +#if DNXCORE50 + return propertyName.ToUpperInvariant(); +#else return propertyName.ToUpper(CultureInfo.InvariantCulture); +#endif } } @@ -566,7 +570,7 @@ namespace Newtonsoft.Json.Tests.Serialization public int ChildId; } -#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || DNXCORE50) +#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) [Test] public void ReadIntegerWithError() { @@ -1356,7 +1360,7 @@ namespace Newtonsoft.Json.Tests.Serialization Assert.AreEqual("value", deserialized.foo.bar); } -#if !(NETFX_CORE || DNXCORE50) +#if !(NETFX_CORE) [Test] public void ConversionOperator() { @@ -1442,7 +1446,7 @@ namespace Newtonsoft.Json.Tests.Serialization } // ignore hiding members compiler warning -#pragma warning disable 108,114 +#pragma warning disable 108, 114 [DataContract] public class BaseWithContract { @@ -1520,7 +1524,7 @@ namespace Newtonsoft.Json.Tests.Serialization [DataMember(Name = "VirtualWithDataMemberSub")] public virtual string VirtualWithDataMember { get; set; } } -#pragma warning restore 108,114 +#pragma warning restore 108, 114 [Test] public void SubWithoutContractNewPropertiesTest() @@ -4752,7 +4756,7 @@ Path '', line 1, position 1."); }", json); } -#if !(PORTABLE || DNXCORE50) +#if !(PORTABLE) [Test] public void DeserializeClassWithInheritedProtectedMember() { @@ -6670,7 +6674,7 @@ Path '', line 1, position 1."); ExceptionAssert.Throws(() => { List numbers = JsonConvert.DeserializeObject>(json); }, "Error converting value {null} to type 'System.Int32'. Path '[3]', line 5, position 7."); } -#if !(PORTABLE || DNXCORE50 || NETFX_CORE) +#if !(PORTABLE || NETFX_CORE) public class ConvertableIntTestClass { public ConvertibleInt Integer { get; set; } @@ -7736,7 +7740,7 @@ Path '', line 1, position 1."); } #if !(NET20 || NET35 || NET40 || PORTABLE40) -#if !(PORTABLE || DNXCORE50) +#if !PORTABLE [Test] public void DeserializeReadOnlyListWithBigInteger() { @@ -7825,7 +7829,7 @@ Path '', line 1, position 1."); } #endif -#if !(NETFX_CORE || PORTABLE || DNXCORE50 || NET35 || NET20 || PORTABLE40) +#if !(NETFX_CORE || PORTABLE || NET35 || NET20 || PORTABLE40 || DNXCORE50) [Test] public void SerializeTupleWithSerializableAttribute() { @@ -8071,7 +8075,7 @@ Path '', line 1, position 1."); } #endif -#if !(PORTABLE || DNXCORE50 || NET35 || NET20 || PORTABLE40) +#if !(PORTABLE || NET35 || NET20 || PORTABLE40) [Test] public void ReadTooLargeInteger() { @@ -8254,7 +8258,7 @@ Path '', line 1, position 1."); } #endif -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) [Test] public void SerializeBigInteger() { @@ -8432,7 +8436,7 @@ Path '', line 1, position 1."); Assert.AreEqual(jane, john.Spouse); } -#if !(NETFX_CORE || NET35 || NET20 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NETFX_CORE || NET35 || NET20 || PORTABLE || PORTABLE40) [Test] public void TypeConverterOnInterface() { @@ -8498,7 +8502,7 @@ Path '', line 1, position 1."); ParticipantEntity deserializedProduct = JsonConvert.DeserializeObject(json); } -#if !(PORTABLE || DNXCORE50 || NETFX_CORE) +#if !(PORTABLE || NETFX_CORE) public class ConvertibleId : IConvertible { public int Value; @@ -9000,7 +9004,7 @@ Path '', line 1, position 1."); } #endif -#if !NETFX_CORE +#if !(NETFX_CORE || DNXCORE50) [Test] public void MailMessageConverterTest() { diff --git a/Src/Newtonsoft.Json.Tests/Serialization/TraceWriterTests.cs b/Src/Newtonsoft.Json.Tests/Serialization/TraceWriterTests.cs index 4e12faef..4d39ffb2 100644 --- a/Src/Newtonsoft.Json.Tests/Serialization/TraceWriterTests.cs +++ b/Src/Newtonsoft.Json.Tests/Serialization/TraceWriterTests.cs @@ -4,7 +4,7 @@ using System.Diagnostics; using System.Globalization; using System.IO; using Newtonsoft.Json.Linq; -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE ||PORTABLE40) using System.Numerics; #endif using System.Runtime.Serialization; @@ -810,7 +810,7 @@ Newtonsoft.Json Error: 0 : Error! Assert.AreEqual(23, deserialized.FavoriteNumber); } -#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NET20 || NET35 || PORTABLE || PORTABLE40) [Test] public void TraceJsonWriterTest() { diff --git a/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs b/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs index 0e26ce07..32f2bf2e 100644 --- a/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs +++ b/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs @@ -144,6 +144,10 @@ namespace Newtonsoft.Json.Tests XAssert.True(false, message); } + public static void Pass() + { + } + public static void IsTrue(bool condition, string message = null) { XAssert.True(condition); @@ -261,7 +265,7 @@ namespace Newtonsoft.Json.Tests protected void TestSetup() #endif { -#if !NETFX_CORE +#if !(NETFX_CORE || DNXCORE50) //CultureInfo turkey = CultureInfo.CreateSpecificCulture("tr"); //Thread.CurrentThread.CurrentCulture = turkey; //Thread.CurrentThread.CurrentUICulture = turkey; diff --git a/Src/Newtonsoft.Json.Tests/TestObjects/IMyInterface.cs b/Src/Newtonsoft.Json.Tests/TestObjects/IMyInterface.cs index 4cf6b890..84ea10f7 100644 --- a/Src/Newtonsoft.Json.Tests/TestObjects/IMyInterface.cs +++ b/Src/Newtonsoft.Json.Tests/TestObjects/IMyInterface.cs @@ -28,15 +28,17 @@ using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.Text; +using System.Reflection; #if NET20 using Newtonsoft.Json.Utilities.LinqBridge; #else using System.Linq; #endif +using Newtonsoft.Json.Utilities; namespace Newtonsoft.Json.Tests.TestObjects { -#if !(NETFX_CORE || NET35 || NET20 || PORTABLE || DNXCORE50 || PORTABLE40) +#if !(NETFX_CORE || NET35 || NET20 || PORTABLE || PORTABLE40) [TypeConverter(typeof(MyInterfaceConverter))] internal interface IMyInterface { @@ -121,9 +123,9 @@ namespace Newtonsoft.Json.Tests.TestObjects { private TypeConverter GetConverter(Type type) { - var converters = type.GetCustomAttributes(typeof(TypeConverterAttribute), true).Union( + var converters = ReflectionUtils.GetAttributes(type, typeof(TypeConverterAttribute), true).Union( from t in type.GetInterfaces() - from c in t.GetCustomAttributes(typeof(TypeConverterAttribute), true) + from c in ReflectionUtils.GetAttributes(t, typeof(TypeConverterAttribute), true) select c).Distinct(); return @@ -136,7 +138,6 @@ namespace Newtonsoft.Json.Tests.TestObjects .FirstOrDefault(); } - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { var converter = GetConverter(value.GetType()); diff --git a/Src/Newtonsoft.Json.Tests/TestObjects/ListOfIds.cs b/Src/Newtonsoft.Json.Tests/TestObjects/ListOfIds.cs index a34e3088..9333c511 100644 --- a/Src/Newtonsoft.Json.Tests/TestObjects/ListOfIds.cs +++ b/Src/Newtonsoft.Json.Tests/TestObjects/ListOfIds.cs @@ -26,6 +26,7 @@ using System; using System.Collections.Generic; using Newtonsoft.Json.Utilities; +using System.Reflection; namespace Newtonsoft.Json.Tests.TestObjects { diff --git a/Src/Newtonsoft.Json.Tests/Utilities/DateTimeUtilsTests.cs b/Src/Newtonsoft.Json.Tests/Utilities/DateTimeUtilsTests.cs index 58aa9c5f..90efefa9 100644 --- a/Src/Newtonsoft.Json.Tests/Utilities/DateTimeUtilsTests.cs +++ b/Src/Newtonsoft.Json.Tests/Utilities/DateTimeUtilsTests.cs @@ -66,20 +66,6 @@ namespace Newtonsoft.Json.Tests.Utilities Assert.AreEqual(value, parsedDt); } - [Test] - public void FailingDateTimeParse() - { - string text = "2000-12-15T22:11:03.055+23:30"; - - DateTime oldDt; - bool success = DateTime.TryParseExact(text, "yyyy-MM-ddTHH:mm:ss.FFFFFFFK", CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind, out oldDt); - - Console.WriteLine("Success: " + success); - Console.WriteLine("DateTime: " + oldDt); - - Assert.IsTrue(success); - } - [Test] public void NewDateTimeParse() { @@ -102,32 +88,24 @@ namespace Newtonsoft.Json.Tests.Utilities AssertNewDateTimeParseEqual("2000-12-15T22:11:03.055Z"); AssertNewDateTimeParseEqual("2000-12-15T22:11:03.055"); AssertNewDateTimeParseEqual("2000-12-15T22:11:03.055+00:00"); - AssertNewDateTimeParseEqual("2000-12-15T22:11:03.055+23:30"); - AssertNewDateTimeParseEqual("2000-12-15T22:11:03.055-23:30"); AssertNewDateTimeParseEqual("2000-12-15T22:11:03.055+11:30"); AssertNewDateTimeParseEqual("2000-12-15T22:11:03.055-11:30"); AssertNewDateTimeParseEqual("2000-12-15T22:11:03Z"); AssertNewDateTimeParseEqual("2000-12-15T22:11:03"); AssertNewDateTimeParseEqual("2000-12-15T22:11:03+00:00"); - AssertNewDateTimeParseEqual("2000-12-15T22:11:03+23:30"); - AssertNewDateTimeParseEqual("2000-12-15T22:11:03-23:30"); AssertNewDateTimeParseEqual("2000-12-15T22:11:03+11:30"); AssertNewDateTimeParseEqual("2000-12-15T22:11:03-11:30"); AssertNewDateTimeParseEqual("0001-01-01T00:00:00Z"); AssertNewDateTimeParseEqual("0001-01-01T00:00:00"); // this is DateTime.MinDate //AssertNewDateTimeParseEqual("0001-01-01T00:00:00+00:00"); // when the timezone is negative then this breaks - //AssertNewDateTimeParseEqual("0001-01-01T00:00:00+23:30"); // I don't know why a different value is returned from DateTime.TryParse, I think it is a bug in .NET - AssertNewDateTimeParseEqual("0001-01-01T00:00:00-23:30"); //AssertNewDateTimeParseEqual("0001-01-01T00:00:00+11:30"); // when the timezone is negative then this breaks AssertNewDateTimeParseEqual("0001-01-01T00:00:00-12:00"); AssertNewDateTimeParseEqual("9999-12-31T23:59:59.9999999Z"); AssertNewDateTimeParseEqual("9999-12-31T23:59:59.9999999"); // this is DateTime.MaxDate AssertNewDateTimeParseEqual("9999-12-31T23:59:59.9999999+00:00", DateTime.MaxValue); // DateTime.TryParse fails instead of returning MaxDate in some timezones - AssertNewDateTimeParseEqual("9999-12-31T23:59:59.9999999+23:30"); - AssertNewDateTimeParseEqual("9999-12-31T23:59:59.9999999-23:30", DateTime.MaxValue); // DateTime.TryParse fails instead of returning MaxDate in some timezones AssertNewDateTimeParseEqual("9999-12-31T23:59:59.9999999+11:30", DateTime.MaxValue); // DateTime.TryParse fails instead of returning MaxDate in some timezones AssertNewDateTimeParseEqual("9999-12-31T23:59:59.9999999-11:30", DateTime.MaxValue); // DateTime.TryParse fails instead of returning MaxDate in some timezones } diff --git a/Src/Newtonsoft.Json.Tests/project.json b/Src/Newtonsoft.Json.Tests/project.json index d2388900..5062c0eb 100644 --- a/Src/Newtonsoft.Json.Tests/project.json +++ b/Src/Newtonsoft.Json.Tests/project.json @@ -1,52 +1,53 @@ { - "version": "1.0.0-*", - "compilationOptions": { - "define": [] - }, - "exclude":[ - "LinqToSql", - "Documentation", - "FileSystemEntityModel.Designer.cs" - ], - "dependencies": { - "Xunit.KRunner": "1.0.0-*", - "Newtonsoft.Json": "6.0.6" - }, - "commands": { - "test": "Xunit.KRunner" - }, - "frameworks": { - "dnxcore50": { - "dependencies": { - "Microsoft.CSharp": "4.0.0-beta-*", - "System.Collections": "4.0.10-beta-*", - "System.ComponentModel.TypeConverter": "4.0.0-beta-*", - "System.Diagnostics.Debug": "4.0.10-beta-*", - "System.Dynamic.Runtime": "4.0.0-beta-*", - "System.Globalization": "4.0.10-beta-*", - "System.IO": "4.0.10-beta-*", - "System.Linq": "4.0.0-beta-*", - "System.Linq.Expressions": "4.0.0-beta-*", - "System.Reflection.Extensions": "4.0.0-beta-*", - "System.Reflection.TypeExtensions": "4.0.0-beta-*", - "System.Runtime": "4.0.20-beta-*", - "System.Runtime.Extensions": "4.0.10-beta-*", - "System.Runtime.Serialization.Primitives": "4.0.0-beta-*", - "System.Runtime.Numerics": "4.0.0-beta-*", - "System.Runtime.Serialization.Json": "4.0.0-beta-*", - "System.Runtime.Serialization.Xml": "4.0.0-beta-*", - "System.Reflection.Emit.ILGeneration": "4.0.0-beta-*", - "System.Text.Encoding": "4.0.10-beta-*", - "System.Text.RegularExpressions": "4.0.0-beta-*", - "System.Text.Encoding.Extensions": "4.0.10-beta-*", - "System.Text.Encoding.CodePages": "4.0.0-beta-*", - "System.Threading": "4.0.0-beta-*", - "System.Xml.XDocument": "4.0.0-beta-*", - "System.Xml.XmlDocument": "4.0.0-beta-*", - "System.Xml.XmlSerializer": "4.0.0-beta-*", - "System.Xml.ReaderWriter": "4.0.10-beta-*", - "Microsoft.Bcl.Immutable": "1.1.20-beta" - } - } + "version": "1.0.0-*", + "compilationOptions": { + "define": [ ] + }, + "exclude": [ + "LinqToSql", + "Documentation", + "**/*.Designer.cs" + ], + "dependencies": { + "xunit": "2.1.0-beta3-*", + "xunit.runner.dnx": "2.1.0-beta3-*", + "Newtonsoft.Json": "", + "System.Collections.Immutable": "1.1.37" + }, + "commands": { + "test": "xunit.runner.dnx -parallel none" + }, + "frameworks": { + "dnxcore50": { + "dependencies": { + "Microsoft.CSharp": "4.0.0-beta-*", + "System.Collections": "4.0.10-beta-*", + "System.ComponentModel.TypeConverter": "4.0.0-beta-*", + "System.Diagnostics.Debug": "4.0.10-beta-*", + "System.Dynamic.Runtime": "4.0.10-beta-*", + "System.Globalization": "4.0.10-beta-*", + "System.IO": "4.0.10-beta-*", + "System.Linq": "4.0.0-beta-*", + "System.Linq.Expressions": "4.0.10-beta-*", + "System.Reflection.Extensions": "4.0.0-beta-*", + "System.Reflection.TypeExtensions": "4.0.0-beta-*", + "System.Runtime": "4.0.20-beta-*", + "System.Runtime.Extensions": "4.0.10-beta-*", + "System.Runtime.Serialization.Primitives": "4.0.10-beta-*", + "System.Runtime.Numerics": "4.0.0-beta-*", + "System.Runtime.Serialization.Json": "4.0.0-beta-*", + "System.Runtime.Serialization.Xml": "4.0.10-beta-*", + "System.Reflection.Emit.ILGeneration": "4.0.0-beta-*", + "System.Text.Encoding": "4.0.10-beta-*", + "System.Text.RegularExpressions": "4.0.10-beta-*", + "System.Text.Encoding.Extensions": "4.0.10-beta-*", + "System.Text.Encoding.CodePages": "4.0.0-beta-*", + "System.Threading": "4.0.10-beta-*", + "System.Xml.XDocument": "4.0.10-beta-*", + "System.Xml.XmlDocument": "4.0.0-beta-*", + "System.Xml.XmlSerializer": "4.0.10-beta-*", + "System.Xml.ReaderWriter": "4.0.10-beta-*" + } } + } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json.WinRT.sln b/Src/Newtonsoft.Json.WinRT.sln deleted file mode 100644 index b7832c4d..00000000 --- a/Src/Newtonsoft.Json.WinRT.sln +++ /dev/null @@ -1,65 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30324.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.WinRT", "Newtonsoft.Json\Newtonsoft.Json.WinRT.csproj", "{263136A2-B89B-424E-A87A-F988CAA8D032}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Tests.WinRT", "Newtonsoft.Json.Tests\Newtonsoft.Json.Tests.WinRT.csproj", "{8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|ARM = Release|ARM - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {263136A2-B89B-424E-A87A-F988CAA8D032}.Debug|ARM.ActiveCfg = Debug|ARM - {263136A2-B89B-424E-A87A-F988CAA8D032}.Debug|ARM.Build.0 = Debug|ARM - {263136A2-B89B-424E-A87A-F988CAA8D032}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {263136A2-B89B-424E-A87A-F988CAA8D032}.Debug|Any CPU.Build.0 = Debug|Any CPU - {263136A2-B89B-424E-A87A-F988CAA8D032}.Debug|x64.ActiveCfg = Debug|x64 - {263136A2-B89B-424E-A87A-F988CAA8D032}.Debug|x64.Build.0 = Debug|x64 - {263136A2-B89B-424E-A87A-F988CAA8D032}.Debug|x86.ActiveCfg = Debug|x86 - {263136A2-B89B-424E-A87A-F988CAA8D032}.Debug|x86.Build.0 = Debug|x86 - {263136A2-B89B-424E-A87A-F988CAA8D032}.Release|ARM.ActiveCfg = Release|ARM - {263136A2-B89B-424E-A87A-F988CAA8D032}.Release|ARM.Build.0 = Release|ARM - {263136A2-B89B-424E-A87A-F988CAA8D032}.Release|Any CPU.ActiveCfg = Release|Any CPU - {263136A2-B89B-424E-A87A-F988CAA8D032}.Release|Any CPU.Build.0 = Release|Any CPU - {263136A2-B89B-424E-A87A-F988CAA8D032}.Release|x64.ActiveCfg = Release|x64 - {263136A2-B89B-424E-A87A-F988CAA8D032}.Release|x64.Build.0 = Release|x64 - {263136A2-B89B-424E-A87A-F988CAA8D032}.Release|x86.ActiveCfg = Release|x86 - {263136A2-B89B-424E-A87A-F988CAA8D032}.Release|x86.Build.0 = Release|x86 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|ARM.ActiveCfg = Debug|ARM - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|ARM.Build.0 = Debug|ARM - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|ARM.Deploy.0 = Debug|ARM - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|x64.ActiveCfg = Debug|x64 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|x64.Build.0 = Debug|x64 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|x64.Deploy.0 = Debug|x64 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|x86.ActiveCfg = Debug|x86 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|x86.Build.0 = Debug|x86 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Debug|x86.Deploy.0 = Debug|x86 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|ARM.ActiveCfg = Release|ARM - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|ARM.Build.0 = Release|ARM - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|ARM.Deploy.0 = Release|ARM - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|Any CPU.Build.0 = Release|Any CPU - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|Any CPU.Deploy.0 = Release|Any CPU - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|x64.ActiveCfg = Release|x64 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|x64.Build.0 = Release|x64 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|x64.Deploy.0 = Release|x64 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|x86.ActiveCfg = Release|x86 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|x86.Build.0 = Release|x86 - {8D9C2E69-9FD7-4A7A-866C-739C9207CD0B}.Release|x86.Deploy.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Src/Newtonsoft.Json.sln b/Src/Newtonsoft.Json.sln index 803fed3c..d7956f25 100644 --- a/Src/Newtonsoft.Json.sln +++ b/Src/Newtonsoft.Json.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json", "Newtonsoft.Json\Newtonsoft.Json.csproj", "{EEEA67F9-9089-481D-A4DC-0966DEC9FD7D}" EndProject diff --git a/Src/Newtonsoft.Json/Bson/BsonBinaryWriter.cs b/Src/Newtonsoft.Json/Bson/BsonBinaryWriter.cs index b0f40262..d2e09cdb 100644 --- a/Src/Newtonsoft.Json/Bson/BsonBinaryWriter.cs +++ b/Src/Newtonsoft.Json/Bson/BsonBinaryWriter.cs @@ -54,7 +54,7 @@ namespace Newtonsoft.Json.Bson public void Close() { -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) _writer.Close(); #else _writer.Dispose(); diff --git a/Src/Newtonsoft.Json/Bson/BsonReader.cs b/Src/Newtonsoft.Json/Bson/BsonReader.cs index 9f07f3fc..4c3effc5 100644 --- a/Src/Newtonsoft.Json/Bson/BsonReader.cs +++ b/Src/Newtonsoft.Json/Bson/BsonReader.cs @@ -297,7 +297,7 @@ namespace Newtonsoft.Json.Bson base.Close(); if (CloseInput && _reader != null) -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) _reader.Close(); #else _reader.Dispose(); diff --git a/Src/Newtonsoft.Json/Bson/BsonWriter.cs b/Src/Newtonsoft.Json/Bson/BsonWriter.cs index 16196a5a..810ca477 100644 --- a/Src/Newtonsoft.Json/Bson/BsonWriter.cs +++ b/Src/Newtonsoft.Json/Bson/BsonWriter.cs @@ -379,7 +379,7 @@ namespace Newtonsoft.Json.Bson { base.WriteValue(value); string s = null; -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) s = value.ToString(CultureInfo.InvariantCulture); #else s = value.ToString(); diff --git a/Src/Newtonsoft.Json/Converters/BinaryConverter.cs b/Src/Newtonsoft.Json/Converters/BinaryConverter.cs index 6c2284db..516ce8fc 100644 --- a/Src/Newtonsoft.Json/Converters/BinaryConverter.cs +++ b/Src/Newtonsoft.Json/Converters/BinaryConverter.cs @@ -23,7 +23,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) using System; using System.Data.SqlTypes; using System.Globalization; diff --git a/Src/Newtonsoft.Json/Converters/CustomCreationConverter.cs b/Src/Newtonsoft.Json/Converters/CustomCreationConverter.cs index adf519b6..68fe6800 100644 --- a/Src/Newtonsoft.Json/Converters/CustomCreationConverter.cs +++ b/Src/Newtonsoft.Json/Converters/CustomCreationConverter.cs @@ -24,6 +24,7 @@ #endregion using System; +using System.Reflection; using Newtonsoft.Json.Utilities; namespace Newtonsoft.Json.Converters diff --git a/Src/Newtonsoft.Json/Converters/DataSetConverter.cs b/Src/Newtonsoft.Json/Converters/DataSetConverter.cs index d39c6b48..adfdef5d 100644 --- a/Src/Newtonsoft.Json/Converters/DataSetConverter.cs +++ b/Src/Newtonsoft.Json/Converters/DataSetConverter.cs @@ -23,7 +23,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) using System; using System.Data; using Newtonsoft.Json.Serialization; diff --git a/Src/Newtonsoft.Json/Converters/DataTableConverter.cs b/Src/Newtonsoft.Json/Converters/DataTableConverter.cs index 41a6b776..5779d9ee 100644 --- a/Src/Newtonsoft.Json/Converters/DataTableConverter.cs +++ b/Src/Newtonsoft.Json/Converters/DataTableConverter.cs @@ -23,10 +23,10 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion +#if !(DOTNET || PORTABLE40 || PORTABLE) using System.Collections.Generic; using System.Globalization; using Newtonsoft.Json.Utilities; -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) using System; using System.Data; using Newtonsoft.Json.Serialization; diff --git a/Src/Newtonsoft.Json/Converters/DiscriminatedUnionConverter.cs b/Src/Newtonsoft.Json/Converters/DiscriminatedUnionConverter.cs index 134ecec4..b4a84c23 100644 --- a/Src/Newtonsoft.Json/Converters/DiscriminatedUnionConverter.cs +++ b/Src/Newtonsoft.Json/Converters/DiscriminatedUnionConverter.cs @@ -23,7 +23,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -#if !(NET35 || NET20 || NETFX_CORE) +#if !(NET35 || NET20) using Newtonsoft.Json.Linq; using System; using System.Collections; @@ -45,7 +45,7 @@ namespace Newtonsoft.Json.Converters /// public class DiscriminatedUnionConverter : JsonConverter { - #region UnionDefinition +#region UnionDefinition internal class Union { public List Cases; @@ -60,7 +60,7 @@ namespace Newtonsoft.Json.Converters public FSharpFunction FieldReader; public FSharpFunction Constructor; } - #endregion +#endregion private const string CasePropertyName = "Case"; private const string FieldsPropertyName = "Fields"; @@ -235,7 +235,7 @@ namespace Newtonsoft.Json.Converters // all fsharp objects have CompilationMappingAttribute // get the fsharp assembly from the attribute and initialize latebound methods object[] attributes; -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) attributes = objectType.GetCustomAttributes(true); #else attributes = objectType.GetTypeInfo().GetCustomAttributes(true).ToArray(); diff --git a/Src/Newtonsoft.Json/Converters/EntityKeyMemberConverter.cs b/Src/Newtonsoft.Json/Converters/EntityKeyMemberConverter.cs index d3b10751..92a26649 100644 --- a/Src/Newtonsoft.Json/Converters/EntityKeyMemberConverter.cs +++ b/Src/Newtonsoft.Json/Converters/EntityKeyMemberConverter.cs @@ -23,7 +23,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(NET20 || DOTNET || PORTABLE40 || PORTABLE) using System; using Newtonsoft.Json.Serialization; using System.Globalization; diff --git a/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs b/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs index cfe5d0eb..1b719748 100644 --- a/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs +++ b/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs @@ -31,6 +31,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Xml; +using System.Reflection; #if !(NET20 || PORTABLE40) using System.Xml.Linq; #endif @@ -44,7 +45,7 @@ using System.Linq; namespace Newtonsoft.Json.Converters { #region XmlNodeWrappers -#if !NETFX_CORE && !PORTABLE && !PORTABLE40 +#if !DOTNET && !PORTABLE && !PORTABLE40 internal class XmlDocumentWrapper : XmlNodeWrapper, IXmlDocument { private readonly XmlDocument _document; @@ -928,7 +929,7 @@ namespace Newtonsoft.Json.Converters if (value is XObject) return XContainerWrapper.WrapNode((XObject)value); #endif -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) if (value is XmlNode) return XmlNodeWrapper.WrapNode((XmlNode)value); #endif @@ -1256,7 +1257,7 @@ namespace Newtonsoft.Json.Converters rootNode = document; } #endif -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) if (typeof(XmlNode).IsAssignableFrom(objectType)) { if (objectType != typeof(XmlDocument)) @@ -1448,7 +1449,7 @@ namespace Newtonsoft.Json.Converters #endif DateTime d = Convert.ToDateTime(reader.Value, CultureInfo.InvariantCulture); -#if !(NETFX_CORE || PORTABLE) +#if !PORTABLE return XmlConvert.ToString(d, DateTimeUtils.ToSerializationMode(d.Kind)); #else return XmlConvert.ToString(d); @@ -1780,7 +1781,7 @@ namespace Newtonsoft.Json.Converters if (typeof(XObject).IsAssignableFrom(valueType)) return true; #endif -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) if (typeof(XmlNode).IsAssignableFrom(valueType)) return true; #endif diff --git a/Src/Newtonsoft.Json/FormatterAssemblyStyle.cs b/Src/Newtonsoft.Json/FormatterAssemblyStyle.cs index 39d3f73a..d08cc337 100644 --- a/Src/Newtonsoft.Json/FormatterAssemblyStyle.cs +++ b/Src/Newtonsoft.Json/FormatterAssemblyStyle.cs @@ -1,5 +1,5 @@  -#if PocketPC || NETFX_CORE || PORTABLE40 || PORTABLE +#if DOTNET || PORTABLE40 || PORTABLE namespace System.Runtime.Serialization.Formatters { diff --git a/Src/Newtonsoft.Json/JsonConvert.cs b/Src/Newtonsoft.Json/JsonConvert.cs index 3176dcff..fdb0deb3 100644 --- a/Src/Newtonsoft.Json/JsonConvert.cs +++ b/Src/Newtonsoft.Json/JsonConvert.cs @@ -357,7 +357,7 @@ namespace Newtonsoft.Json { string text; string qc; -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) text = value.ToString("D", CultureInfo.InvariantCulture); qc = quoteChar.ToString(CultureInfo.InvariantCulture); #else @@ -481,7 +481,7 @@ namespace Newtonsoft.Json return ToString((DateTime)value); case PrimitiveTypeCode.Decimal: return ToString((decimal)value); -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) case PrimitiveTypeCode.DBNull: return Null; #endif @@ -969,7 +969,7 @@ namespace Newtonsoft.Json } #endif -#if !(PORTABLE40 || PORTABLE || NETFX_CORE) +#if !(PORTABLE40 || PORTABLE || DOTNET) /// /// Serializes the XML node to a JSON string. /// diff --git a/Src/Newtonsoft.Json/JsonException.cs b/Src/Newtonsoft.Json/JsonException.cs index 7072ffd3..97ea7242 100644 --- a/Src/Newtonsoft.Json/JsonException.cs +++ b/Src/Newtonsoft.Json/JsonException.cs @@ -35,7 +35,7 @@ namespace Newtonsoft.Json /// /// The exception thrown when an error occurs during JSON serialization or deserialization. /// -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) [Serializable] #endif public class JsonException : Exception @@ -68,7 +68,7 @@ namespace Newtonsoft.Json { } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) /// /// Initializes a new instance of the class. /// diff --git a/Src/Newtonsoft.Json/JsonReaderException.cs b/Src/Newtonsoft.Json/JsonReaderException.cs index bd871062..9f448c4b 100644 --- a/Src/Newtonsoft.Json/JsonReaderException.cs +++ b/Src/Newtonsoft.Json/JsonReaderException.cs @@ -33,7 +33,7 @@ namespace Newtonsoft.Json /// /// The exception thrown when an error occurs while reading JSON text. /// -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) [Serializable] #endif public class JsonReaderException : JsonException @@ -84,7 +84,7 @@ namespace Newtonsoft.Json { } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) /// /// Initializes a new instance of the class. /// diff --git a/Src/Newtonsoft.Json/JsonSerializationException.cs b/Src/Newtonsoft.Json/JsonSerializationException.cs index 5680a541..1c872c78 100644 --- a/Src/Newtonsoft.Json/JsonSerializationException.cs +++ b/Src/Newtonsoft.Json/JsonSerializationException.cs @@ -33,7 +33,7 @@ namespace Newtonsoft.Json /// /// The exception thrown when an error occurs during JSON serialization or deserialization. /// -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) [Serializable] #endif public class JsonSerializationException : JsonException @@ -66,7 +66,7 @@ namespace Newtonsoft.Json { } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) /// /// Initializes a new instance of the class. /// diff --git a/Src/Newtonsoft.Json/JsonTextReader.cs b/Src/Newtonsoft.Json/JsonTextReader.cs index 302acfad..54343a1b 100644 --- a/Src/Newtonsoft.Json/JsonTextReader.cs +++ b/Src/Newtonsoft.Json/JsonTextReader.cs @@ -1624,11 +1624,13 @@ namespace Newtonsoft.Json base.Close(); if (CloseInput && _reader != null) -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) + { +#if !(DOTNET || PORTABLE40 || PORTABLE) _reader.Close(); #else _reader.Dispose(); #endif + } if (_buffer != null) _buffer.Clear(); diff --git a/Src/Newtonsoft.Json/JsonTextWriter.cs b/Src/Newtonsoft.Json/JsonTextWriter.cs index 2fdd8372..9e29ec8c 100644 --- a/Src/Newtonsoft.Json/JsonTextWriter.cs +++ b/Src/Newtonsoft.Json/JsonTextWriter.cs @@ -152,11 +152,13 @@ namespace Newtonsoft.Json base.Close(); if (CloseOutput && _writer != null) -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) + { +#if !(DOTNET || PORTABLE40 || PORTABLE) _writer.Close(); #else _writer.Dispose(); #endif + } } /// @@ -636,7 +638,7 @@ namespace Newtonsoft.Json string text = null; -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) text = value.ToString("D", CultureInfo.InvariantCulture); #else text = value.ToString("D"); diff --git a/Src/Newtonsoft.Json/JsonWriter.cs b/Src/Newtonsoft.Json/JsonWriter.cs index 689a5652..b8706efc 100644 --- a/Src/Newtonsoft.Json/JsonWriter.cs +++ b/Src/Newtonsoft.Json/JsonWriter.cs @@ -1396,13 +1396,13 @@ namespace Newtonsoft.Json case PrimitiveTypeCode.Bytes: writer.WriteValue((byte[])value); break; -#if !(PORTABLE || NETFX_CORE) +#if !(PORTABLE || DOTNET) case PrimitiveTypeCode.DBNull: writer.WriteNull(); break; #endif default: -#if !(PORTABLE || NETFX_CORE) +#if !PORTABLE if (value is IConvertible) { // the value is a non-standard IConvertible diff --git a/Src/Newtonsoft.Json/JsonWriterException.cs b/Src/Newtonsoft.Json/JsonWriterException.cs index 4ed62c1a..2bfa78db 100644 --- a/Src/Newtonsoft.Json/JsonWriterException.cs +++ b/Src/Newtonsoft.Json/JsonWriterException.cs @@ -33,7 +33,7 @@ namespace Newtonsoft.Json /// /// The exception thrown when an error occurs while reading JSON text. /// -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) [Serializable] #endif public class JsonWriterException : JsonException @@ -72,7 +72,7 @@ namespace Newtonsoft.Json { } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) /// /// Initializes a new instance of the class. /// diff --git a/Src/Newtonsoft.Json/Linq/JContainer.cs b/Src/Newtonsoft.Json/Linq/JContainer.cs index cb662d99..a705b577 100644 --- a/Src/Newtonsoft.Json/Linq/JContainer.cs +++ b/Src/Newtonsoft.Json/Linq/JContainer.cs @@ -46,17 +46,15 @@ namespace Newtonsoft.Json.Linq /// Represents a token that can contain other tokens. /// public abstract class JContainer : JToken, IList -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) , ITypedList, IBindingList -#elif PORTABLE - , INotifyCollectionChanged #endif , IList -#if !(NET20 || NET35 || NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(NET20 || NET35 || PORTABLE40) , INotifyCollectionChanged #endif { -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) internal ListChangedEventHandler _listChanged; internal AddingNewEventHandler _addingNew; @@ -132,7 +130,7 @@ namespace Newtonsoft.Json.Linq return new List(); } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) /// /// Raises the event. /// @@ -376,7 +374,7 @@ namespace Newtonsoft.Json.Linq ChildrenTokens.Insert(index, item); -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) if (_listChanged != null) OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index)); #endif @@ -410,7 +408,7 @@ namespace Newtonsoft.Json.Linq ChildrenTokens.RemoveAt(index); -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) if (_listChanged != null) OnListChanged(new ListChangedEventArgs(ListChangedType.ItemDeleted, index)); #endif @@ -474,7 +472,7 @@ namespace Newtonsoft.Json.Linq existing.Previous = null; existing.Next = null; -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) if (_listChanged != null) OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index)); #endif @@ -497,7 +495,7 @@ namespace Newtonsoft.Json.Linq ChildrenTokens.Clear(); -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) if (_listChanged != null) OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1)); #endif @@ -791,7 +789,7 @@ namespace Newtonsoft.Json.Linq return hashCode; } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) string ITypedList.GetListName(PropertyDescriptor[] listAccessors) { return string.Empty; @@ -960,7 +958,7 @@ namespace Newtonsoft.Json.Linq #endregion #region IBindingList Members -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) void IBindingList.AddIndex(PropertyDescriptor property) { } diff --git a/Src/Newtonsoft.Json/Linq/JObject.cs b/Src/Newtonsoft.Json/Linq/JObject.cs index 0ef4b0ea..a7b354cd 100644 --- a/Src/Newtonsoft.Json/Linq/JObject.cs +++ b/Src/Newtonsoft.Json/Linq/JObject.cs @@ -52,10 +52,10 @@ namespace Newtonsoft.Json.Linq /// /// public class JObject : JContainer, IDictionary, INotifyPropertyChanged -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) , ICustomTypeDescriptor #endif -#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(NET20 || PORTABLE40 || PORTABLE) , INotifyPropertyChanging #endif { @@ -75,7 +75,7 @@ namespace Newtonsoft.Json.Linq /// public event PropertyChangedEventHandler PropertyChanged; -#if !(NET20 || NETFX_CORE || PORTABLE || PORTABLE40) +#if !(NET20 || PORTABLE || PORTABLE40) /// /// Occurs when a property value is changing. /// @@ -192,7 +192,7 @@ namespace Newtonsoft.Json.Linq internal void InternalPropertyChanged(JProperty childProperty) { OnPropertyChanged(childProperty.Name); -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) if (_listChanged != null) OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, IndexOfItem(childProperty))); #endif @@ -204,7 +204,7 @@ namespace Newtonsoft.Json.Linq internal void InternalPropertyChanging(JProperty childProperty) { -#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(NET20 || PORTABLE40 || PORTABLE) OnPropertyChanging(childProperty.Name); #endif } @@ -307,7 +307,7 @@ namespace Newtonsoft.Json.Linq } else { -#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(NET20 || PORTABLE40 || PORTABLE) OnPropertyChanging(propertyName); #endif Add(new JProperty(propertyName, value)); @@ -618,7 +618,7 @@ namespace Newtonsoft.Json.Linq PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE || NET20) +#if !(PORTABLE40 || PORTABLE || NET20) /// /// Raises the event with the provided arguments. /// @@ -630,7 +630,7 @@ namespace Newtonsoft.Json.Linq } #endif -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) // include custom type descriptor on JObject rather than use a provider because the properties are specific to a type #region ICustomTypeDescriptor diff --git a/Src/Newtonsoft.Json/Linq/JPropertyDescriptor.cs b/Src/Newtonsoft.Json/Linq/JPropertyDescriptor.cs index 71360a83..00eb8575 100644 --- a/Src/Newtonsoft.Json/Linq/JPropertyDescriptor.cs +++ b/Src/Newtonsoft.Json/Linq/JPropertyDescriptor.cs @@ -23,7 +23,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) using System; using System.ComponentModel; diff --git a/Src/Newtonsoft.Json/Linq/JToken.cs b/Src/Newtonsoft.Json/Linq/JToken.cs index b3f4df01..61abfa91 100644 --- a/Src/Newtonsoft.Json/Linq/JToken.cs +++ b/Src/Newtonsoft.Json/Linq/JToken.cs @@ -52,7 +52,7 @@ namespace Newtonsoft.Json.Linq /// Represents an abstract JSON token. /// public abstract class JToken : IJEnumerable, IJsonLineInfo -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) , ICloneable #endif #if !(NET35 || NET20 || PORTABLE40) @@ -2069,7 +2069,7 @@ namespace Newtonsoft.Json.Linq } #endif -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) object ICloneable.Clone() { return DeepClone(); diff --git a/Src/Newtonsoft.Json/Linq/JTokenWriter.cs b/Src/Newtonsoft.Json/Linq/JTokenWriter.cs index a2dfbe86..dd81f5d2 100644 --- a/Src/Newtonsoft.Json/Linq/JTokenWriter.cs +++ b/Src/Newtonsoft.Json/Linq/JTokenWriter.cs @@ -365,7 +365,7 @@ namespace Newtonsoft.Json.Linq { base.WriteValue(value); string s = null; -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) s = value.ToString(CultureInfo.InvariantCulture); #else s = value.ToString(); diff --git a/Src/Newtonsoft.Json/Linq/JValue.cs b/Src/Newtonsoft.Json/Linq/JValue.cs index 0033ca34..048e4c42 100644 --- a/Src/Newtonsoft.Json/Linq/JValue.cs +++ b/Src/Newtonsoft.Json/Linq/JValue.cs @@ -42,7 +42,7 @@ namespace Newtonsoft.Json.Linq /// Represents a value in JSON (string, integer, date, etc). /// public class JValue : JToken, IEquatable, IFormattable, IComparable, IComparable -#if !(NETFX_CORE || PORTABLE) +#if !PORTABLE , IConvertible #endif { @@ -563,7 +563,7 @@ namespace Newtonsoft.Json.Linq { if (value == null) return JTokenType.Null; -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) else if (value == DBNull.Value) return JTokenType.Null; #endif @@ -965,7 +965,7 @@ namespace Newtonsoft.Json.Linq return Compare(_valueType, _value, obj._value); } -#if !(NETFX_CORE || PORTABLE) +#if !PORTABLE TypeCode IConvertible.GetTypeCode() { if (_value == null) @@ -980,7 +980,12 @@ namespace Newtonsoft.Json.Linq return TypeCode.Object; #endif - return System.Type.GetTypeCode(_value.GetType()); + IConvertible convertable = _value as IConvertible; + + if (convertable == null) + return TypeCode.Object; + + return convertable.GetTypeCode(); } bool IConvertible.ToBoolean(IFormatProvider provider) @@ -1058,5 +1063,5 @@ namespace Newtonsoft.Json.Linq return ToObject(conversionType); } #endif - } + } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj deleted file mode 100644 index 0a7acf63..00000000 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj +++ /dev/null @@ -1,320 +0,0 @@ - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {263136A2-B89B-424E-A87A-F988CAA8D032} - Library - Properties - Newtonsoft.Json - Newtonsoft.Json - en-US - 512 - {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - bin\Debug\WinRT\ - DEBUG;TRACE;NETFX_CORE - prompt - 3 - Newtonsoft.Json.ruleset - true - - - pdbonly - true - bin\Release\WinRT\ - TRACE;NETFX_CORE - prompt - 4 - bin\Release\WinRT\Newtonsoft.Json.xml - true - Newtonsoft.Json.ruleset - - - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE - ;2008 - full - ARM - false - prompt - ExpressRules.ruleset - true - - - bin\ARM\Release\ - TRACE;NETFX_CORE - true - ;2008 - pdbonly - ARM - false - prompt - ExpressRules.ruleset - true - - - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE - ;2008 - full - x64 - false - prompt - ExpressRules.ruleset - true - - - bin\x64\Release\ - TRACE;NETFX_CORE - true - ;2008 - pdbonly - x64 - false - prompt - ExpressRules.ruleset - true - - - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE - ;2008 - full - x86 - false - prompt - ExpressRules.ruleset - true - - - bin\x86\Release\ - TRACE;NETFX_CORE - true - ;2008 - pdbonly - x86 - false - prompt - ExpressRules.ruleset - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12.0 - - - - \ No newline at end of file diff --git a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs index d69ec8c2..27343e4e 100644 --- a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs @@ -36,8 +36,8 @@ using System.Security; [assembly: AssemblyTitle("Json.NET Portable .NET 4.0")] #elif PORTABLE [assembly: AssemblyTitle("Json.NET Portable")] -#elif NETFX_CORE -[assembly: AssemblyTitle("Json.NET WinRT")] +#elif DOTNET +[assembly: AssemblyTitle("Json.NET .NET Platform")] #elif NET20 [assembly: AssemblyTitle("Json.NET .NET 2.0")] [assembly: AllowPartiallyTrustedCallers] @@ -92,5 +92,5 @@ using System.Security; // by using the '*' as shown below: [assembly: AssemblyVersion("7.0.0.0")] -[assembly: AssemblyFileVersion("7.0.1.18621")] +[assembly: AssemblyFileVersion("7.0.2.18802")] [assembly: CLSCompliant(true)] diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs index 51d46459..9b44cee3 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs @@ -36,7 +36,7 @@ namespace Newtonsoft.Json.Schema /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. /// /// -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) [Serializable] #endif [Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details.")] @@ -89,7 +89,7 @@ namespace Newtonsoft.Json.Schema { } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) /// /// Initializes a new instance of the class. /// diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs index bb1d759d..a61f9ec6 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs @@ -187,7 +187,7 @@ namespace Newtonsoft.Json.Schema if (containerAttribute != null && !string.IsNullOrEmpty(containerAttribute.Description)) return containerAttribute.Description; -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) DescriptionAttribute descriptionAttribute = ReflectionUtils.GetAttribute(type); if (descriptionAttribute != null) return descriptionAttribute.Description; @@ -335,7 +335,7 @@ namespace Newtonsoft.Json.Schema } } break; -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) case JsonContractType.Serializable: CurrentSchema.Type = AddNullType(JsonSchemaType.Object, valueRequired); CurrentSchema.Id = GetTypeId(type, false); @@ -394,7 +394,7 @@ namespace Newtonsoft.Json.Schema CurrentSchema.AllowAdditionalProperties = false; } -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) private void GenerateISerializableContract(Type type, JsonISerializableContract contract) { CurrentSchema.AllowAdditionalProperties = true; @@ -435,7 +435,7 @@ namespace Newtonsoft.Json.Schema case PrimitiveTypeCode.Empty: case PrimitiveTypeCode.Object: return schemaType | JsonSchemaType.String; -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) case PrimitiveTypeCode.DBNull: return schemaType | JsonSchemaType.Null; #endif diff --git a/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs b/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs index dba6a228..d0ffd560 100644 --- a/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs +++ b/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs @@ -37,7 +37,7 @@ using System.Dynamic; using System.Globalization; using System.Reflection; using System.Runtime.Serialization; -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) using System.Security.Permissions; #endif using System.Xml.Serialization; @@ -106,7 +106,7 @@ namespace Newtonsoft.Json.Serialization private static readonly JsonConverter[] BuiltInConverters = { -#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(NET20 || DOTNET || PORTABLE40 || PORTABLE) new EntityKeyMemberConverter(), #endif #if !(NET35 || NET20 || PORTABLE40) @@ -115,15 +115,12 @@ namespace Newtonsoft.Json.Serialization #if !(PORTABLE40) new XmlNodeConverter(), #endif -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) new BinaryConverter(), new DataSetConverter(), new DataTableConverter(), #endif -#if NETFX_CORE - new JsonValueConverter(), -#endif -#if !(NET35 || NET20 || NETFX_CORE) +#if !(NET35 || NET20) new DiscriminatedUnionConverter(), #endif new KeyValuePairConverter(), @@ -149,7 +146,7 @@ namespace Newtonsoft.Json.Serialization get { return JsonTypeReflector.DynamicCodeGeneration; } } -#if !(NETFX_CORE || PORTABLE) +#if !PORTABLE /// /// Gets or sets the default members search flags. /// @@ -157,7 +154,7 @@ namespace Newtonsoft.Json.Serialization [ObsoleteAttribute("DefaultMembersSearchFlags is obsolete. To modify the members serialized inherit from DefaultContractResolver and override the GetSerializableMembers method instead.")] public BindingFlags DefaultMembersSearchFlags { get; set; } #else - private BindingFlags DefaultMembersSearchFlags = BindingFlags.Instance | BindingFlags.Public; + private BindingFlags DefaultMembersSearchFlags; #endif /// @@ -168,7 +165,7 @@ namespace Newtonsoft.Json.Serialization /// public bool SerializeCompilerGeneratedMembers { get; set; } -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) /// /// Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. /// @@ -191,14 +188,13 @@ namespace Newtonsoft.Json.Serialization /// public DefaultContractResolver() { -#if !NETFX_CORE -#pragma warning disable 618 - DefaultMembersSearchFlags = BindingFlags.Public | BindingFlags.Instance; -#pragma warning restore 618 -#endif -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) IgnoreSerializableAttribute = true; #endif + +#pragma warning disable 618 + DefaultMembersSearchFlags = BindingFlags.Instance | BindingFlags.Public; +#pragma warning restore 618 } /// @@ -268,7 +264,7 @@ namespace Newtonsoft.Json.Serialization protected virtual List GetSerializableMembers(Type objectType) { bool ignoreSerializableAttribute; -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) ignoreSerializableAttribute = IgnoreSerializableAttribute; #else ignoreSerializableAttribute = true; @@ -366,7 +362,7 @@ namespace Newtonsoft.Json.Serialization InitializeContract(contract); bool ignoreSerializableAttribute; -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) ignoreSerializableAttribute = IgnoreSerializableAttribute; #else ignoreSerializableAttribute = true; @@ -393,7 +389,7 @@ namespace Newtonsoft.Json.Serialization } else if (contract.MemberSerialization == MemberSerialization.Fields) { -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) // mimic DataContractSerializer behaviour when populating fields by overriding default creator to create an uninitialized object // note that this is only possible when the application is fully trusted so fall back to using the default constructor (if available) in partial trust if (JsonTypeReflector.FullyTrusted) @@ -832,7 +828,7 @@ namespace Newtonsoft.Json.Serialization if (t.IsGenericType() && t.GetGenericTypeDefinition() == typeof(ConcurrentDictionary<,>)) return true; #endif -#if !(NET35 || NET20 || NETFX_CORE) +#if !(NET35 || NET20) if (t.Name == FSharpUtils.FSharpSetTypeName || t.Name == FSharpUtils.FSharpMapTypeName) return true; #endif @@ -842,11 +838,11 @@ namespace Newtonsoft.Json.Serialization private static bool ShouldSkipSerializing(Type t) { -#if !(NET35 || NET20 || NETFX_CORE) +#if !(NET35 || NET20) if (t.Name == FSharpUtils.FSharpSetTypeName || t.Name == FSharpUtils.FSharpMapTypeName) return true; #endif -#if NETFX_CORE +#if DOTNET if (t.IsGenericType() && t.GetGenericTypeDefinition() == typeof(ConcurrentDictionary<,>)) return true; #endif @@ -924,7 +920,7 @@ namespace Newtonsoft.Json.Serialization return contract; } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) /// /// Creates a for the given type. /// @@ -1012,7 +1008,7 @@ namespace Newtonsoft.Json.Serialization if (CanConvertToString(t)) return CreateStringContract(objectType); -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) if (!IgnoreSerializableInterface && typeof(ISerializable).IsAssignableFrom(t)) return CreateISerializableContract(objectType); #endif @@ -1022,7 +1018,7 @@ namespace Newtonsoft.Json.Serialization return CreateDynamicContract(objectType); #endif -#if !(PORTABLE || NETFX_CORE) +#if !PORTABLE // tested last because it is not possible to automatically deserialize custom IConvertible types if (IsIConvertible(t)) return CreatePrimitiveContract(t); @@ -1038,7 +1034,7 @@ namespace Newtonsoft.Json.Serialization return (typeCode != PrimitiveTypeCode.Empty && typeCode != PrimitiveTypeCode.Object); } -#if !(PORTABLE || NETFX_CORE) +#if !PORTABLE internal static bool IsIConvertible(Type t) { if (typeof(IConvertible).IsAssignableFrom(t) @@ -1053,7 +1049,7 @@ namespace Newtonsoft.Json.Serialization internal static bool CanConvertToString(Type type) { -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) TypeConverter converter = ConvertUtils.GetConverter(type); // use the objectType's TypeConverter if it has one and can convert to a string @@ -1160,7 +1156,7 @@ namespace Newtonsoft.Json.Serialization // warning - this method use to cause errors with Intellitrace. Retest in VS Ultimate after changes IValueProvider valueProvider; -#if !(PORTABLE40 || PORTABLE || NETFX_CORE) +#if !(PORTABLE40 || PORTABLE || DOTNET) if (DynamicCodeGeneration) valueProvider = new DynamicValueProvider(member); else @@ -1268,7 +1264,7 @@ namespace Newtonsoft.Json.Serialization JsonTypeReflector.GetAttribute(attributeProvider) != null // automatically ignore extension data dictionary property if it is public || JsonTypeReflector.GetAttribute(attributeProvider) != null -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) || JsonTypeReflector.GetAttribute(attributeProvider) != null #endif ; diff --git a/Src/Newtonsoft.Json/Serialization/DefaultSerializationBinder.cs b/Src/Newtonsoft.Json/Serialization/DefaultSerializationBinder.cs index 98855b44..b3120ef9 100644 --- a/Src/Newtonsoft.Json/Serialization/DefaultSerializationBinder.cs +++ b/Src/Newtonsoft.Json/Serialization/DefaultSerializationBinder.cs @@ -49,19 +49,19 @@ namespace Newtonsoft.Json.Serialization { Assembly assembly; -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) // look, I don't like using obsolete methods as much as you do but this is the only way // Assembly.Load won't check the GAC for a partial name #pragma warning disable 618,612 assembly = Assembly.LoadWithPartialName(assemblyName); #pragma warning restore 618,612 -#elif NETFX_CORE || PORTABLE +#elif DOTNET || PORTABLE assembly = Assembly.Load(new AssemblyName(assemblyName)); #else assembly = Assembly.Load(assemblyName); #endif -#if !(PORTABLE40 || PORTABLE || NETFX_CORE) +#if !(PORTABLE40 || PORTABLE || DOTNET) if (assembly == null) { // will find assemblies loaded with Assembly.LoadFile outside of the main directory @@ -145,7 +145,7 @@ namespace Newtonsoft.Json.Serialization /// Specifies the name of the serialized object. public override void BindToName(Type serializedType, out string assemblyName, out string typeName) { -#if NETFX_CORE || PORTABLE +#if (DOTNET || PORTABLE) assemblyName = serializedType.GetTypeInfo().Assembly.FullName; typeName = serializedType.FullName; #else diff --git a/Src/Newtonsoft.Json/Serialization/DiagnosticsTraceWriter.cs b/Src/Newtonsoft.Json/Serialization/DiagnosticsTraceWriter.cs index ef00dd2b..1b3f17b4 100644 --- a/Src/Newtonsoft.Json/Serialization/DiagnosticsTraceWriter.cs +++ b/Src/Newtonsoft.Json/Serialization/DiagnosticsTraceWriter.cs @@ -1,4 +1,4 @@ -#if !(PORTABLE40 || PORTABLE || NETFX_CORE) +#if !(PORTABLE40 || PORTABLE || DOTNET) using System; using System.Diagnostics; using DiagnosticsTrace = System.Diagnostics.Trace; diff --git a/Src/Newtonsoft.Json/Serialization/DynamicValueProvider.cs b/Src/Newtonsoft.Json/Serialization/DynamicValueProvider.cs index 5c758aeb..6ed4ba2a 100644 --- a/Src/Newtonsoft.Json/Serialization/DynamicValueProvider.cs +++ b/Src/Newtonsoft.Json/Serialization/DynamicValueProvider.cs @@ -23,7 +23,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -#if !(PORTABLE40 || PORTABLE || NETFX_CORE) +#if !(PORTABLE40 || PORTABLE || DOTNET) using System; using System.Collections.Generic; #if NET20 diff --git a/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs b/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs index cc9d89ae..827ef149 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs @@ -165,7 +165,7 @@ namespace Newtonsoft.Json.Serialization _parametrizedConstructor = CollectionUtils.ResolveEnumerableCollectionConstructor(underlyingType, CollectionItemType); -#if !(NET35 || NET20 || NETFX_CORE) +#if !(NET35 || NET20) if (!HasParametrizedCreator && underlyingType.Name == FSharpUtils.FSharpListTypeName) { FSharpUtils.EnsureInitialized(underlyingType.Assembly()); diff --git a/Src/Newtonsoft.Json/Serialization/JsonDictionaryContract.cs b/Src/Newtonsoft.Json/Serialization/JsonDictionaryContract.cs index 693150f3..a8ad117a 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonDictionaryContract.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonDictionaryContract.cs @@ -148,7 +148,7 @@ namespace Newtonsoft.Json.Serialization { _parametrizedConstructor = CollectionUtils.ResolveEnumerableCollectionConstructor(CreatedType, typeof(KeyValuePair<,>).MakeGenericType(keyType, valueType)); -#if !(NET35 || NET20 || NETFX_CORE) +#if !(NET35 || NET20) if (!HasParametrizedCreator && underlyingType.Name == FSharpUtils.FSharpMapTypeName) { FSharpUtils.EnsureInitialized(underlyingType.Assembly()); diff --git a/Src/Newtonsoft.Json/Serialization/JsonFormatterConverter.cs b/Src/Newtonsoft.Json/Serialization/JsonFormatterConverter.cs index cc68e9d0..2b3d67fe 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonFormatterConverter.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonFormatterConverter.cs @@ -23,7 +23,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) using System; using System.Globalization; using System.Runtime.Serialization; diff --git a/Src/Newtonsoft.Json/Serialization/JsonISerializableContract.cs b/Src/Newtonsoft.Json/Serialization/JsonISerializableContract.cs index d69e5fb5..7ac82731 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonISerializableContract.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonISerializableContract.cs @@ -23,7 +23,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) using System; using System.Runtime.Serialization; diff --git a/Src/Newtonsoft.Json/Serialization/JsonObjectContract.cs b/Src/Newtonsoft.Json/Serialization/JsonObjectContract.cs index de6facb9..00eba901 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonObjectContract.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonObjectContract.cs @@ -181,7 +181,7 @@ namespace Newtonsoft.Json.Serialization CreatorParameters = new JsonPropertyCollection(UnderlyingType); } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) #if !(NET20 || NET35) [SecuritySafeCritical] #endif diff --git a/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalBase.cs b/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalBase.cs index 096a5792..8c1e18b4 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalBase.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalBase.cs @@ -43,13 +43,8 @@ namespace Newtonsoft.Json.Serialization int IEqualityComparer.GetHashCode(object obj) { -#if !(NETFX_CORE) // put objects in a bucket based on their reference return RuntimeHelpers.GetHashCode(obj); -#else - // put all objects in the same bucket so ReferenceEquals is called on all - return -1; -#endif } } diff --git a/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs b/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs index 778e5a46..76578a47 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs @@ -291,7 +291,7 @@ namespace Newtonsoft.Json.Serialization return EnsureType(reader, constructorName, CultureInfo.InvariantCulture, contract, objectType); case JsonToken.Null: case JsonToken.Undefined: -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) if (objectType == typeof(DBNull)) return DBNull.Value; #endif @@ -321,7 +321,7 @@ namespace Newtonsoft.Json.Serialization { case JsonContractType.Object: case JsonContractType.Dictionary: -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) case JsonContractType.Serializable: #endif #if !(NET35 || NET20 || PORTABLE40) @@ -508,7 +508,7 @@ namespace Newtonsoft.Json.Serialization JsonDynamicContract dynamicContract = (JsonDynamicContract)contract; return CreateDynamic(reader, dynamicContract, member, id); #endif -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) case JsonContractType.Serializable: JsonISerializableContract serializableContract = (JsonISerializableContract)contract; return CreateISerializable(reader, serializableContract, member, id); @@ -1444,7 +1444,7 @@ namespace Newtonsoft.Json.Serialization return underlyingList; } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) private object CreateISerializable(JsonReader reader, JsonISerializableContract contract, JsonProperty member, string id) { Type objectType = contract.UnderlyingType; diff --git a/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs b/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs index c7f2d466..fc779989 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs @@ -188,7 +188,7 @@ namespace Newtonsoft.Json.Serialization SerializeDynamic(writer, (IDynamicMetaObjectProvider)value, (JsonDynamicContract)valueContract, member, containerContract, containerProperty); break; #endif -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) case JsonContractType.Serializable: SerializeISerializable(writer, (ISerializable)value, (JsonISerializableContract)valueContract, member, containerContract, containerProperty); break; @@ -331,7 +331,7 @@ namespace Newtonsoft.Json.Serialization internal static bool TryConvertToString(object value, Type type, out string s) { -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) TypeConverter converter = ConvertUtils.GetConverter(type); // use the objectType's TypeConverter if it has one and can convert to a string @@ -347,12 +347,12 @@ namespace Newtonsoft.Json.Serialization } #endif -#if NETFX_CORE || PORTABLE - if (value is Guid || value is Uri || value is TimeSpan) - { - s = value.ToString(); - return true; - } +#if (DOTNET || PORTABLE) + if (value is Guid || value is Uri || value is TimeSpan) + { + s = value.ToString(); + return true; + } #endif if (value is Type) @@ -739,7 +739,7 @@ namespace Newtonsoft.Json.Serialization return writeMetadataObject; } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) #if !(NET20 || NET35) [SecuritySafeCritical] #endif diff --git a/Src/Newtonsoft.Json/Serialization/JsonTypeReflector.cs b/Src/Newtonsoft.Json/Serialization/JsonTypeReflector.cs index 638c58c4..ebc79511 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonTypeReflector.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonTypeReflector.cs @@ -29,7 +29,7 @@ using System.ComponentModel; using System.Globalization; using System.Reflection; using System.Security; -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) using System.Security.Permissions; #endif using Newtonsoft.Json.Utilities; @@ -59,7 +59,7 @@ namespace Newtonsoft.Json.Serialization private static readonly ThreadSafeStore> JsonConverterCreatorCache = new ThreadSafeStore>(GetJsonConverterCreator); -#if !(NET20 || NETFX_CORE) +#if !(NET20 || DOTNET) private static readonly ThreadSafeStore AssociatedMetadataTypesCache = new ThreadSafeStore(GetAssociateMetadataTypeFromAttribute); private static ReflectionObject _metadataTypeAttributeReflectionObject; #endif @@ -131,7 +131,7 @@ namespace Newtonsoft.Json.Serialization return MemberSerialization.OptIn; #endif -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) if (!ignoreSerializableAttribute) { SerializableAttribute serializableAttribute = GetCachedAttribute(objectType); @@ -214,14 +214,14 @@ namespace Newtonsoft.Json.Serialization }; } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(PORTABLE40 || PORTABLE) public static TypeConverter GetTypeConverter(Type type) { return TypeDescriptor.GetConverter(type); } #endif -#if !(NET20 || NETFX_CORE) +#if !(NET20 || DOTNET) private static Type GetAssociatedMetadataType(Type type) { return AssociatedMetadataTypesCache.Get(type); @@ -256,7 +256,7 @@ namespace Newtonsoft.Json.Serialization { T attribute; -#if !(NET20 || NETFX_CORE) +#if !(NET20 || DOTNET) Type metadataType = GetAssociatedMetadataType(type); if (metadataType != null) { @@ -284,7 +284,7 @@ namespace Newtonsoft.Json.Serialization { T attribute; -#if !(NET20 || NETFX_CORE) +#if !(NET20 || DOTNET) Type metadataType = GetAssociatedMetadataType(memberInfo.DeclaringType); if (metadataType != null) { @@ -348,14 +348,14 @@ namespace Newtonsoft.Json.Serialization public static bool DynamicCodeGeneration { -#if !(NET20 || NET35 || NETFX_CORE || PORTABLE) +#if !(NET20 || NET35 || PORTABLE) [SecuritySafeCritical] #endif get { if (_dynamicCodeGeneration == null) { -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) try { new ReflectionPermission(ReflectionPermissionFlag.MemberAccess).Demand(); @@ -384,7 +384,7 @@ namespace Newtonsoft.Json.Serialization { if (_fullyTrusted == null) { -#if (NETFX_CORE || PORTABLE || PORTABLE40) +#if (DOTNET || PORTABLE || PORTABLE40) _fullyTrusted = false; #elif !(NET20 || NET35 || PORTABLE40) AppDomain appDomain = AppDomain.CurrentDomain; @@ -411,7 +411,7 @@ namespace Newtonsoft.Json.Serialization { get { -#if !(PORTABLE40 || PORTABLE || NETFX_CORE) +#if !(PORTABLE40 || PORTABLE || DOTNET) if (DynamicCodeGeneration) return DynamicReflectionDelegateFactory.Instance; diff --git a/Src/Newtonsoft.Json/SerializationBinder.cs b/Src/Newtonsoft.Json/SerializationBinder.cs index 0489ef1e..301d3339 100644 --- a/Src/Newtonsoft.Json/SerializationBinder.cs +++ b/Src/Newtonsoft.Json/SerializationBinder.cs @@ -1,5 +1,5 @@  -#if PocketPC || NETFX_CORE || PORTABLE40 || PORTABLE +#if (DOTNET || PORTABLE40 || PORTABLE) using System; using System.Reflection; diff --git a/Src/Newtonsoft.Json/TraceLevel.cs b/Src/Newtonsoft.Json/TraceLevel.cs index a6244d8e..0d1c3189 100644 --- a/Src/Newtonsoft.Json/TraceLevel.cs +++ b/Src/Newtonsoft.Json/TraceLevel.cs @@ -1,5 +1,5 @@  -#if (NETFX_CORE || PORTABLE40 || PORTABLE) +#if (DOTNET || PORTABLE40 || PORTABLE) using Newtonsoft.Json.Serialization; namespace Newtonsoft.Json diff --git a/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs b/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs index 0ab4fe83..e27d9a13 100644 --- a/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs +++ b/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs @@ -37,9 +37,8 @@ using System.Reflection; #if NET20 using Newtonsoft.Json.Utilities.LinqBridge; #endif -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) using System.Data.SqlTypes; - #endif namespace Newtonsoft.Json.Utilities @@ -152,14 +151,15 @@ namespace Newtonsoft.Json.Utilities { typeof(Uri), PrimitiveTypeCode.Uri }, { typeof(string), PrimitiveTypeCode.String }, { typeof(byte[]), PrimitiveTypeCode.Bytes }, -#if !(PORTABLE || PORTABLE40 || NETFX_CORE) +#if !(PORTABLE || PORTABLE40 || DOTNET) { typeof(DBNull), PrimitiveTypeCode.DBNull } #endif }; -#if !(NETFX_CORE || PORTABLE) +#if !PORTABLE private static readonly TypeInformation[] PrimitiveTypeCodes = { + // need all of these. lookup against the index with TypeCode value new TypeInformation { Type = typeof(object), TypeCode = PrimitiveTypeCode.Empty }, new TypeInformation { Type = typeof(object), TypeCode = PrimitiveTypeCode.Object }, new TypeInformation { Type = typeof(object), TypeCode = PrimitiveTypeCode.DBNull }, @@ -219,7 +219,7 @@ namespace Newtonsoft.Json.Utilities return PrimitiveTypeCode.Object; } -#if !(NETFX_CORE || PORTABLE) +#if !PORTABLE public static TypeInformation GetTypeInformation(IConvertible convertable) { TypeInformation typeInformation = PrimitiveTypeCodes[(int)convertable.GetTypeCode()]; @@ -229,12 +229,12 @@ namespace Newtonsoft.Json.Utilities public static bool IsConvertible(Type t) { -#if !(NETFX_CORE || PORTABLE) +#if !PORTABLE return typeof(IConvertible).IsAssignableFrom(t); #else - return ( - t == typeof(bool) || t == typeof(byte) || t == typeof(char) || t == typeof(DateTime) || t == typeof(decimal) || t == typeof(double) || t == typeof(short) || t == typeof(int) || - t == typeof(long) || t == typeof(sbyte) || t == typeof(float) || t == typeof(string) || t == typeof(ushort) || t == typeof(uint) || t == typeof(ulong) || t.IsEnum()); + return ( + t == typeof(bool) || t == typeof(byte) || t == typeof(char) || t == typeof(DateTime) || t == typeof(decimal) || t == typeof(double) || t == typeof(short) || t == typeof(int) || + t == typeof(long) || t == typeof(sbyte) || t == typeof(float) || t == typeof(string) || t == typeof(ushort) || t == typeof(uint) || t == typeof(ulong) || t.IsEnum()); #endif } @@ -353,7 +353,7 @@ namespace Newtonsoft.Json.Utilities } #endif - #region TryConvert +#region TryConvert internal enum ConvertResult { Success = 0, @@ -496,7 +496,7 @@ namespace Newtonsoft.Json.Utilities } #endif -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(PORTABLE40 || PORTABLE) // see if source or target types have a TypeConverter that converts between the two TypeConverter toConverter = GetConverter(initialType); @@ -514,7 +514,7 @@ namespace Newtonsoft.Json.Utilities return ConvertResult.Success; } #endif -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) // handle DBNull and INullable if (initialValue == DBNull.Value) { @@ -529,7 +529,7 @@ namespace Newtonsoft.Json.Utilities return ConvertResult.CannotConvertNull; } #endif -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) if (initialValue is INullable) { value = EnsureTypeAssignable(ToValue((INullable)initialValue), initialType, targetType); @@ -546,9 +546,9 @@ namespace Newtonsoft.Json.Utilities value = null; return ConvertResult.NoValidConversion; } - #endregion +#endregion - #region ConvertOrCast +#region ConvertOrCast /// /// Converts the value to the specified type. If the value is unable to be converted, the /// value is checked whether it assignable to the specified type. @@ -575,7 +575,7 @@ namespace Newtonsoft.Json.Utilities return EnsureTypeAssignable(initialValue, ReflectionUtils.GetObjectType(initialValue), targetType); } - #endregion +#endregion private static object EnsureTypeAssignable(object value, Type initialType, Type targetType) { @@ -599,7 +599,7 @@ namespace Newtonsoft.Json.Utilities throw new ArgumentException("Could not cast or convert from {0} to {1}.".FormatWith(CultureInfo.InvariantCulture, (initialType != null) ? initialType.ToString() : "{null}", targetType)); } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(DOTNET || PORTABLE40 || PORTABLE) public static object ToValue(INullable nullableValue) { if (nullableValue == null) @@ -619,7 +619,7 @@ namespace Newtonsoft.Json.Utilities } #endif -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(PORTABLE40 || PORTABLE) internal static TypeConverter GetConverter(Type t) { return JsonTypeReflector.GetTypeConverter(t); diff --git a/Src/Newtonsoft.Json/Utilities/DateTimeUtils.cs b/Src/Newtonsoft.Json/Utilities/DateTimeUtils.cs index 9f0bb195..f6f9db51 100644 --- a/Src/Newtonsoft.Json/Utilities/DateTimeUtils.cs +++ b/Src/Newtonsoft.Json/Utilities/DateTimeUtils.cs @@ -57,7 +57,7 @@ namespace Newtonsoft.Json.Utilities #endif } -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(PORTABLE40 || PORTABLE) public static XmlDateTimeSerializationMode ToSerializationMode(DateTimeKind kind) { switch (kind) diff --git a/Src/Newtonsoft.Json/Utilities/DynamicReflectionDelegateFactory.cs b/Src/Newtonsoft.Json/Utilities/DynamicReflectionDelegateFactory.cs index efd14ff4..7533af34 100644 --- a/Src/Newtonsoft.Json/Utilities/DynamicReflectionDelegateFactory.cs +++ b/Src/Newtonsoft.Json/Utilities/DynamicReflectionDelegateFactory.cs @@ -23,7 +23,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -#if !(PORTABLE || NETFX_CORE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) using System; using System.Collections.Generic; #if NET20 diff --git a/Src/Newtonsoft.Json/Utilities/FSharpUtils.cs b/Src/Newtonsoft.Json/Utilities/FSharpUtils.cs index 13b0ee54..acd938bf 100644 --- a/Src/Newtonsoft.Json/Utilities/FSharpUtils.cs +++ b/Src/Newtonsoft.Json/Utilities/FSharpUtils.cs @@ -23,8 +23,8 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion +#if !(NET35 || NET20) using System.Threading; -#if !(NET35 || NET20 || NETFX_CORE) using System; using System.Collections.Generic; using System.Linq; @@ -112,7 +112,7 @@ namespace Newtonsoft.Json.Utilities _mapType = fsharpCoreAssembly.GetType("Microsoft.FSharp.Collections.FSharpMap`2"); -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) Thread.MemoryBarrier(); #endif _initialized = true; diff --git a/Src/Newtonsoft.Json/Utilities/ILGeneratorExtensions.cs b/Src/Newtonsoft.Json/Utilities/ILGeneratorExtensions.cs index 30fd02b7..349c0909 100644 --- a/Src/Newtonsoft.Json/Utilities/ILGeneratorExtensions.cs +++ b/Src/Newtonsoft.Json/Utilities/ILGeneratorExtensions.cs @@ -23,7 +23,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion -#if !(PORTABLE40 || PORTABLE || NETFX_CORE) +#if !(DOTNET || PORTABLE40 || PORTABLE) using System; using System.Reflection.Emit; using System.Reflection; diff --git a/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs b/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs index e3a3933d..cf22842a 100644 --- a/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs +++ b/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs @@ -43,7 +43,7 @@ using Newtonsoft.Json.Serialization; namespace Newtonsoft.Json.Utilities { -#if (NETFX_CORE || PORTABLE || PORTABLE40) +#if (DOTNET || PORTABLE || PORTABLE40) internal enum MemberTypes { Property = 0, @@ -54,7 +54,7 @@ namespace Newtonsoft.Json.Utilities } #endif -#if NETFX_CORE || PORTABLE +#if PORTABLE [Flags] internal enum BindingFlags { @@ -87,7 +87,7 @@ namespace Newtonsoft.Json.Utilities static ReflectionUtils() { -#if !(NETFX_CORE || PORTABLE40 || PORTABLE) +#if !(PORTABLE40 || PORTABLE) EmptyTypes = Type.EmptyTypes; #else EmptyTypes = new Type[0]; @@ -669,7 +669,7 @@ namespace Newtonsoft.Json.Utilities return (attributes != null) ? attributes.FirstOrDefault() : null; } -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) public static T[] GetAttributes(object attributeProvider, bool inherit) where T : Attribute { Attribute[] a = GetAttributes(attributeProvider, typeof(T), inherit); @@ -848,7 +848,7 @@ namespace Newtonsoft.Json.Utilities ValidationUtils.ArgumentNotNull(targetType, "targetType"); List fieldInfos = new List(targetType.GetFields(bindingAttr)); -#if !(NETFX_CORE || PORTABLE) +#if !PORTABLE // Type.GetFields doesn't return inherited private fields // manually find private fields from base class GetChildPrivateFields(fieldInfos, targetType, bindingAttr); @@ -857,7 +857,7 @@ namespace Newtonsoft.Json.Utilities return fieldInfos.Cast(); } -#if !(NETFX_CORE || PORTABLE) +#if !PORTABLE private static void GetChildPrivateFields(IList initialFields, Type targetType, BindingFlags bindingAttr) { // fix weirdness with private FieldInfos only being returned for the current Type diff --git a/Src/Newtonsoft.Json/Utilities/StringUtils.cs b/Src/Newtonsoft.Json/Utilities/StringUtils.cs index 975f1962..236dd23b 100644 --- a/Src/Newtonsoft.Json/Utilities/StringUtils.cs +++ b/Src/Newtonsoft.Json/Utilities/StringUtils.cs @@ -170,7 +170,7 @@ namespace Newtonsoft.Json.Utilities if (i > 0 && hasNext && !char.IsUpper(chars[i + 1])) break; -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) chars[i] = char.ToLower(chars[i], CultureInfo.InvariantCulture); #else chars[i] = char.ToLowerInvariant(chars[i]); diff --git a/Src/Newtonsoft.Json/Utilities/ThreadSafeStore.cs b/Src/Newtonsoft.Json/Utilities/ThreadSafeStore.cs index d961126a..7181ac5a 100644 --- a/Src/Newtonsoft.Json/Utilities/ThreadSafeStore.cs +++ b/Src/Newtonsoft.Json/Utilities/ThreadSafeStore.cs @@ -78,7 +78,7 @@ namespace Newtonsoft.Json.Utilities Dictionary newStore = new Dictionary(_store); newStore[key] = value; -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) Thread.MemoryBarrier(); #endif _store = newStore; diff --git a/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs b/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs index 3b4d1454..96472ca0 100644 --- a/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs +++ b/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs @@ -36,7 +36,8 @@ namespace Newtonsoft.Json.Utilities { internal static class TypeExtensions { -#if NETFX_CORE || PORTABLE +#if DOTNET || PORTABLE +#if !DOTNET private static BindingFlags DefaultFlags = BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance; public static MethodInfo GetGetMethod(this PropertyInfo propertyInfo) @@ -66,29 +67,32 @@ namespace Newtonsoft.Json.Utilities return null; } +#endif public static bool IsSubclassOf(this Type type, Type c) { return type.GetTypeInfo().IsSubclassOf(c); } +#if !DOTNET public static bool IsAssignableFrom(this Type type, Type c) { return type.GetTypeInfo().IsAssignableFrom(c.GetTypeInfo()); } +#endif public static bool IsInstanceOfType(this Type type, object o) { if (o == null) return false; - return IsAssignableFrom(type, o.GetType()); + return type.IsAssignableFrom(o.GetType()); } #endif public static MethodInfo Method(this Delegate d) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return d.Method; #else return d.GetMethodInfo(); @@ -97,7 +101,7 @@ namespace Newtonsoft.Json.Utilities public static MemberTypes MemberType(this MemberInfo memberInfo) { -#if !(NETFX_CORE || PORTABLE || PORTABLE40) +#if !(DOTNET || PORTABLE || PORTABLE40) return memberInfo.MemberType; #else if (memberInfo is PropertyInfo) @@ -115,7 +119,7 @@ namespace Newtonsoft.Json.Utilities public static bool ContainsGenericParameters(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.ContainsGenericParameters; #else return type.GetTypeInfo().ContainsGenericParameters; @@ -124,7 +128,7 @@ namespace Newtonsoft.Json.Utilities public static bool IsInterface(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.IsInterface; #else return type.GetTypeInfo().IsInterface; @@ -133,7 +137,7 @@ namespace Newtonsoft.Json.Utilities public static bool IsGenericType(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.IsGenericType; #else return type.GetTypeInfo().IsGenericType; @@ -142,7 +146,7 @@ namespace Newtonsoft.Json.Utilities public static bool IsGenericTypeDefinition(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.IsGenericTypeDefinition; #else return type.GetTypeInfo().IsGenericTypeDefinition; @@ -151,7 +155,7 @@ namespace Newtonsoft.Json.Utilities public static Type BaseType(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.BaseType; #else return type.GetTypeInfo().BaseType; @@ -160,7 +164,7 @@ namespace Newtonsoft.Json.Utilities public static Assembly Assembly(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.Assembly; #else return type.GetTypeInfo().Assembly; @@ -169,7 +173,7 @@ namespace Newtonsoft.Json.Utilities public static bool IsEnum(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.IsEnum; #else return type.GetTypeInfo().IsEnum; @@ -178,7 +182,7 @@ namespace Newtonsoft.Json.Utilities public static bool IsClass(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.IsClass; #else return type.GetTypeInfo().IsClass; @@ -187,17 +191,17 @@ namespace Newtonsoft.Json.Utilities public static bool IsSealed(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.IsSealed; #else return type.GetTypeInfo().IsSealed; #endif } -#if PORTABLE40 +#if (PORTABLE40 || DOTNET || PORTABLE) public static PropertyInfo GetProperty(this Type type, string name, BindingFlags bindingFlags, object placeholder1, Type propertyType, IList indexParameters, object placeholder2) { - IList propertyInfos = type.GetProperties(bindingFlags); + IEnumerable propertyInfos = type.GetProperties(bindingFlags); return propertyInfos.Where(p => { @@ -217,10 +221,8 @@ namespace Newtonsoft.Json.Utilities public static IEnumerable GetMember(this Type type, string name, MemberTypes memberType, BindingFlags bindingFlags) { - return type.GetMembers(bindingFlags).Where(m => + return type.GetMember(name, bindingFlags).Where(m => { - if (name != null && name != m.Name) - return false; if (m.MemberType() != memberType) return false; @@ -229,19 +231,20 @@ namespace Newtonsoft.Json.Utilities } #endif -#if (NETFX_CORE || PORTABLE) +#if (DOTNET || PORTABLE) public static MethodInfo GetBaseDefinition(this MethodInfo method) { return method.GetRuntimeBaseDefinition(); } #endif -#if (NETFX_CORE || PORTABLE) +#if (DOTNET || PORTABLE) public static bool IsDefined(this Type type, Type attributeType, bool inherit) { return type.GetTypeInfo().CustomAttributes.Any(a => a.AttributeType == attributeType); } +#if !DOTNET public static MethodInfo GetMethod(this Type type, string name) { return type.GetMethod(name, DefaultFlags); @@ -276,39 +279,6 @@ namespace Newtonsoft.Json.Utilities }).SingleOrDefault(); } - public static PropertyInfo GetProperty(this Type type, string name, BindingFlags bindingFlags, object placeholder1, Type propertyType, IList indexParameters, object placeholder2) - { - return type.GetTypeInfo().DeclaredProperties.Where(p => - { - if (name != null && name != p.Name) - return false; - if (propertyType != null && propertyType != p.PropertyType) - return false; - if (indexParameters != null) - { - if (!p.GetIndexParameters().Select(ip => ip.ParameterType).SequenceEqual(indexParameters)) - return false; - } - - return true; - }).SingleOrDefault(); - } - - public static IEnumerable GetMember(this Type type, string name, MemberTypes memberType, BindingFlags bindingFlags) - { - return type.GetTypeInfo().GetMembersRecursive().Where(m => - { - if (name != null && name != m.Name) - return false; - if (m.MemberType() != memberType) - return false; - if (!TestAccessibility(m, bindingFlags)) - return false; - - return true; - }); - } - public static IEnumerable GetConstructors(this Type type) { return type.GetConstructors(DefaultFlags); @@ -517,11 +487,12 @@ namespace Newtonsoft.Json.Utilities { return type.GetTypeInfo().DeclaredMethods; } +#endif #endif public static bool IsAbstract(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.IsAbstract; #else return type.GetTypeInfo().IsAbstract; @@ -530,7 +501,7 @@ namespace Newtonsoft.Json.Utilities public static bool IsVisible(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.IsVisible; #else return type.GetTypeInfo().IsVisible; @@ -539,7 +510,7 @@ namespace Newtonsoft.Json.Utilities public static bool IsValueType(this Type type) { -#if !(NETFX_CORE || PORTABLE) +#if !(DOTNET || PORTABLE) return type.IsValueType; #else return type.GetTypeInfo().IsValueType; diff --git a/Src/Newtonsoft.Json/project.json b/Src/Newtonsoft.Json/project.json new file mode 100644 index 00000000..48b84cff --- /dev/null +++ b/Src/Newtonsoft.Json/project.json @@ -0,0 +1,36 @@ +{ + "version": "7.0.2-beta1-*", + "description": "Json.NET is a popular high-performance JSON framework for .NET", + "authors": [ "James Newton-King" ], + "tags": [ "json" ], + "projectUrl": "http://www.newtonsoft.com/json", + "licenseUrl": "https://raw.github.com/JamesNK/Newtonsoft.Json/master/LICENSE.md", + + "frameworks": { + "dotnet": { + "dependencies": { + "Microsoft.CSharp": "4.0.0-beta-*", + "System.Collections": "4.0.10-beta-*", + "System.Collections.Concurrent": "4.0.10-beta-*", + "System.ComponentModel.TypeConverter": "4.0.0-beta-*", + "System.Diagnostics.Debug": "4.0.10-beta-*", + "System.Diagnostics.Tools": "4.0.0-beta-*", + "System.Dynamic.Runtime": "4.0.10-beta-*", + "System.Globalization": "4.0.10-beta-*", + "System.IO": "4.0.10-beta-*", + "System.Linq": "4.0.0-beta-*", + "System.Linq.Expressions": "4.0.10-beta-*", + "System.Runtime": "4.0.20-beta-*", + "System.Runtime.Extensions": "4.0.10-beta-*", + "System.Runtime.Numerics": "4.0.0-beta-*", + "System.Runtime.Serialization.Primitives": "4.0.10-beta-*", + "System.Text.Encoding": "4.0.10-beta-*", + "System.Text.Encoding.Extensions": "4.0.10-beta-*", + "System.Text.RegularExpressions": "4.0.10-beta-*", + "System.Threading": "4.0.10-beta-*", + "System.Xml.ReaderWriter": "4.0.10-beta-*", + "System.Xml.XDocument": "4.0.10-beta-*" + } + } + } +} \ No newline at end of file diff --git a/Src/NuGet.Config b/Src/NuGet.Config index 1ca3f8e6..95143bd0 100644 --- a/Src/NuGet.Config +++ b/Src/NuGet.Config @@ -1,7 +1,8 @@  + - + diff --git a/Src/global.json b/Src/global.json new file mode 100644 index 00000000..1039ef51 --- /dev/null +++ b/Src/global.json @@ -0,0 +1,6 @@ +{ + "projects": [ "src" ], + "sdk": { + "version": "1.0.0-beta6" + } +} diff --git a/Tools/PSake/psake.psm1 b/Tools/PSake/psake.psm1 index e5261ff1..74be70c4 100644 --- a/Tools/PSake/psake.psm1 +++ b/Tools/PSake/psake.psm1 @@ -315,7 +315,7 @@ function Invoke-psake { ) try { if (-not $nologo) { - "psake version {0}`nCopyright (c) 2010-2014 James Kovacs & Contributors`n" -f $psake.version + "psake version {0}`nCopyright (c) 2010-2015 James Kovacs, Damian Hickey & Contributors`n" -f $psake.version } if (!$buildFile) { @@ -580,10 +580,15 @@ function ConfigureBuildEnvironment { '4.0' { $versions = @('v4.0.30319') } - '4.5.1' { + {($_ -eq '4.5.1') -or ($_ -eq '4.5.2')} { $versions = @('v4.0.30319') $buildToolsVersions = @('14.0', '12.0') } + '4.6' { + $versions = @('v4.0.30319') + $buildToolsVersions = @('14.0') + } + default { throw ($msgs.error_unknown_framework -f $versionPart, $framework) } @@ -838,7 +843,7 @@ convertfrom-stringdata @' import-localizeddata -bindingvariable msgs -erroraction silentlycontinue $script:psake = @{} -$psake.version = "4.4.1" # contains the current version of psake +$psake.version = "4.4.2" # contains the current version of psake $psake.context = new-object system.collections.stack # holds onto the current state of all variables $psake.run_by_psake_build_tester = $false # indicates that build is being run by psake-BuildTester $psake.config_default = new-object psobject -property @{ @@ -857,4 +862,4 @@ $psake.build_script_dir = "" # contains a string with fully-qualified path to cu LoadConfiguration -export-modulemember -function Invoke-psake, Invoke-Task, Task, Properties, Include, FormatTaskName, TaskSetup, TaskTearDown, Framework, Assert, Exec -variable psake \ No newline at end of file +export-modulemember -function Invoke-psake, Invoke-Task, Task, Properties, Include, FormatTaskName, TaskSetup, TaskTearDown, Framework, Assert, Exec -variable psake