-Fixed builds
This commit is contained in:
@@ -1546,14 +1546,16 @@ namespace Newtonsoft.Json.Tests.Bson
|
||||
|
||||
public class MyBinder : DefaultSerializationBinder
|
||||
{
|
||||
public bool BindToNameCalled { get; set; }
|
||||
public bool BindToTypeCalled { get; set; }
|
||||
|
||||
#if !(NET20 || NET35)
|
||||
public bool BindToNameCalled { get; set; }
|
||||
public override void BindToName(Type serializedType, out string assemblyName, out string typeName)
|
||||
{
|
||||
BindToNameCalled = true;
|
||||
base.BindToName(serializedType, out assemblyName, out typeName);
|
||||
}
|
||||
#endif
|
||||
|
||||
public override Type BindToType(string assemblyName, string typeName)
|
||||
{
|
||||
@@ -1595,7 +1597,9 @@ namespace Newtonsoft.Json.Tests.Bson
|
||||
Assert.AreEqual("Dog!", deserialized.Animals[0].Name);
|
||||
Assert.IsTrue(deserialized.Animals[0] is Dog);
|
||||
|
||||
#if !(NET20 || NET35)
|
||||
Assert.IsTrue(binder.BindToNameCalled);
|
||||
#endif
|
||||
Assert.IsTrue(binder.BindToTypeCalled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -609,6 +609,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(PORTABLE40 || NET35 || NET20)
|
||||
[Test]
|
||||
public void ExpicitConversionTest()
|
||||
{
|
||||
@@ -631,6 +632,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
byte[] dataBytes = (byte[])o.data;
|
||||
Assert.AreEqual(example, Encoding.UTF8.GetString(dataBytes));
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void GetTypeCode()
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using Newtonsoft.Json.Linq.JsonPath;
|
||||
using Newtonsoft.Json.Tests.Bson;
|
||||
#if !NETFX_CORE
|
||||
@@ -434,6 +436,7 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
|
||||
Assert.IsTrue(JToken.DeepEquals(new JObject(new JProperty("hi", 3)), t[1]));
|
||||
}
|
||||
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
|
||||
[Test]
|
||||
public void GreaterQueryBigInteger()
|
||||
{
|
||||
@@ -448,6 +451,7 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
|
||||
Assert.IsTrue(JToken.DeepEquals(new JObject(new JProperty("hi", 2)), t[0]));
|
||||
Assert.IsTrue(JToken.DeepEquals(new JObject(new JProperty("hi", 3)), t[1]));
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void GreaterOrEqualQuery()
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json.Linq.JsonPath;
|
||||
#if !NETFX_CORE
|
||||
|
||||
@@ -90,8 +90,10 @@
|
||||
<Compile Include="JsonValidatingReaderTests.cs" />
|
||||
<Compile Include="Linq\ComponentModel\BindingTests.cs" />
|
||||
<Compile Include="Linq\ComponentModel\JPropertyDescriptorTests.cs" />
|
||||
<Compile Include="Linq\JPathTests.cs" />
|
||||
<Compile Include="Linq\JRawTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPathExecuteTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPathParseTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryExpressionTests.cs" />
|
||||
<Compile Include="Serialization\ConstructorHandlingTests.cs" />
|
||||
<Compile Include="Serialization\ContractResolverTests.cs" />
|
||||
<Compile Include="Serialization\DefaultValueHandlingTests.cs" />
|
||||
|
||||
@@ -132,8 +132,10 @@
|
||||
<Compile Include="Linq\ComponentModel\BindingTests.cs" />
|
||||
<Compile Include="Linq\ComponentModel\JPropertyDescriptorTests.cs" />
|
||||
<Compile Include="Linq\DynamicTests.cs" />
|
||||
<Compile Include="Linq\JPathTests.cs" />
|
||||
<Compile Include="Linq\JRawTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPathExecuteTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPathParseTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryExpressionTests.cs" />
|
||||
<Compile Include="Serialization\ConstructorHandlingTests.cs" />
|
||||
<Compile Include="Serialization\ContractResolverTests.cs" />
|
||||
<Compile Include="Serialization\DefaultValueHandlingTests.cs" />
|
||||
|
||||
@@ -249,8 +249,10 @@
|
||||
<Compile Include="Linq\ComponentModel\BindingTests.cs" />
|
||||
<Compile Include="Linq\ComponentModel\JPropertyDescriptorTests.cs" />
|
||||
<Compile Include="Linq\DynamicTests.cs" />
|
||||
<Compile Include="Linq\JPathTests.cs" />
|
||||
<Compile Include="Linq\JRawTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPathExecuteTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPathParseTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryExpressionTests.cs" />
|
||||
<Compile Include="Schema\JsonSchemaSpecTests.cs" />
|
||||
<Compile Include="Serialization\ConstructorHandlingTests.cs" />
|
||||
<Compile Include="Serialization\ContractResolverTests.cs" />
|
||||
|
||||
@@ -134,8 +134,10 @@
|
||||
<Compile Include="Linq\ComponentModel\BindingTests.cs" />
|
||||
<Compile Include="Linq\ComponentModel\JPropertyDescriptorTests.cs" />
|
||||
<Compile Include="Linq\DynamicTests.cs" />
|
||||
<Compile Include="Linq\JPathTests.cs" />
|
||||
<Compile Include="Linq\JRawTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPathExecuteTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPathParseTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryExpressionTests.cs" />
|
||||
<Compile Include="Serialization\ConstructorHandlingTests.cs" />
|
||||
<Compile Include="Serialization\ContractResolverTests.cs" />
|
||||
<Compile Include="Serialization\DefaultValueHandlingTests.cs" />
|
||||
|
||||
@@ -131,8 +131,10 @@
|
||||
<Compile Include="Linq\ComponentModel\BindingTests.cs" />
|
||||
<Compile Include="Linq\ComponentModel\JPropertyDescriptorTests.cs" />
|
||||
<Compile Include="Linq\DynamicTests.cs" />
|
||||
<Compile Include="Linq\JPathTests.cs" />
|
||||
<Compile Include="Linq\JRawTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPathExecuteTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPathParseTests.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryExpressionTests.cs" />
|
||||
<Compile Include="Serialization\ConstructorHandlingTests.cs" />
|
||||
<Compile Include="Serialization\ContractResolverTests.cs" />
|
||||
<Compile Include="Serialization\DefaultValueHandlingTests.cs" />
|
||||
|
||||
@@ -75,4 +75,4 @@ using System.Security;
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("4.5.0.0")]
|
||||
[assembly: AssemblyFileVersion("5.0.8.16801")]
|
||||
[assembly: AssemblyFileVersion("5.0.8.16808")]
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json.Utilities;
|
||||
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
|
||||
using System;
|
||||
|
||||
@@ -27,7 +27,11 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
#if NET20
|
||||
using Newtonsoft.Json.Utilities.LinqBridge;
|
||||
#else
|
||||
using System.Linq;
|
||||
#endif
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using System.Globalization;
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using Newtonsoft.Json.Utilities;
|
||||
|
||||
namespace Newtonsoft.Json.Linq.JsonPath
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Newtonsoft.Json.Linq.JsonPath
|
||||
{
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
<Compile Include="Converters\DataSetConverter.cs" />
|
||||
<Compile Include="Converters\DataTableConverter.cs" />
|
||||
<Compile Include="Converters\DateTimeConverterBase.cs" />
|
||||
<Compile Include="Converters\DiscriminatedUnionConverter.cs" />
|
||||
<Compile Include="Converters\EntityKeyMemberConverter.cs" />
|
||||
<Compile Include="Converters\KeyValuePairConverter.cs" />
|
||||
<Compile Include="Converters\RegexConverter.cs" />
|
||||
@@ -106,6 +107,15 @@
|
||||
<Compile Include="JsonExtensionDataAttribute.cs" />
|
||||
<Compile Include="JsonPosition.cs" />
|
||||
<Compile Include="Linq\JPropertyKeyedCollection.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArrayIndexFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArrayMultipleIndexFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArraySliceFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\FieldFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPath.cs" />
|
||||
<Compile Include="Linq\JsonPath\PathFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryExpression.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ScanFilter.cs" />
|
||||
<Compile Include="SerializationBinder.cs" />
|
||||
<Compile Include="Serialization\DiagnosticsTraceWriter.cs" />
|
||||
<Compile Include="Serialization\ExpressionValueProvider.cs" />
|
||||
@@ -123,7 +133,6 @@
|
||||
<Compile Include="Utilities\ExpressionReflectionDelegateFactory.cs" />
|
||||
<Compile Include="Utilities\ImmutableCollectionsUtils.cs" />
|
||||
<Compile Include="Utilities\LinqBridge.cs" />
|
||||
<Compile Include="Linq\JPath.cs" />
|
||||
<Compile Include="Linq\JPropertyDescriptor.cs" />
|
||||
<Compile Include="Linq\JRaw.cs" />
|
||||
<Compile Include="Required.cs" />
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
<Compile Include="Converters\DataTableConverter.cs" />
|
||||
<Compile Include="Converters\CustomCreationConverter.cs" />
|
||||
<Compile Include="Converters\DateTimeConverterBase.cs" />
|
||||
<Compile Include="Converters\DiscriminatedUnionConverter.cs" />
|
||||
<Compile Include="Converters\EntityKeyMemberConverter.cs" />
|
||||
<Compile Include="Converters\ExpandoObjectConverter.cs" />
|
||||
<Compile Include="Converters\KeyValuePairConverter.cs" />
|
||||
@@ -118,6 +119,15 @@
|
||||
<Compile Include="JsonPosition.cs" />
|
||||
<Compile Include="Linq\JPropertyDescriptor.cs" />
|
||||
<Compile Include="Linq\JPropertyKeyedCollection.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArrayIndexFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArrayMultipleIndexFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArraySliceFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\FieldFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPath.cs" />
|
||||
<Compile Include="Linq\JsonPath\PathFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryExpression.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ScanFilter.cs" />
|
||||
<Compile Include="SerializationBinder.cs" />
|
||||
<Compile Include="Serialization\DiagnosticsTraceWriter.cs" />
|
||||
<Compile Include="Serialization\ExpressionValueProvider.cs" />
|
||||
@@ -130,7 +140,6 @@
|
||||
<Compile Include="TraceLevel.cs" />
|
||||
<Compile Include="Utilities\DateTimeParser.cs" />
|
||||
<Compile Include="Utilities\DynamicProxy.cs" />
|
||||
<Compile Include="Linq\JPath.cs" />
|
||||
<Compile Include="Linq\JRaw.cs" />
|
||||
<Compile Include="Required.cs" />
|
||||
<Compile Include="Serialization\JsonDynamicContract.cs" />
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
<Compile Include="Converters\DataTableConverter.cs" />
|
||||
<Compile Include="Converters\CustomCreationConverter.cs" />
|
||||
<Compile Include="Converters\DateTimeConverterBase.cs" />
|
||||
<Compile Include="Converters\DiscriminatedUnionConverter.cs" />
|
||||
<Compile Include="Converters\EntityKeyMemberConverter.cs" />
|
||||
<Compile Include="Converters\ExpandoObjectConverter.cs" />
|
||||
<Compile Include="Converters\KeyValuePairConverter.cs" />
|
||||
@@ -119,6 +120,15 @@
|
||||
<Compile Include="JsonExtensionDataAttribute.cs" />
|
||||
<Compile Include="JsonPosition.cs" />
|
||||
<Compile Include="Linq\JPropertyKeyedCollection.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArrayIndexFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArrayMultipleIndexFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArraySliceFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\FieldFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPath.cs" />
|
||||
<Compile Include="Linq\JsonPath\PathFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryExpression.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ScanFilter.cs" />
|
||||
<Compile Include="Serialization\DiagnosticsTraceWriter.cs" />
|
||||
<Compile Include="Serialization\ExpressionValueProvider.cs" />
|
||||
<Compile Include="Serialization\ITraceWriter.cs" />
|
||||
@@ -129,7 +139,6 @@
|
||||
<Compile Include="StringEscapeHandling.cs" />
|
||||
<Compile Include="Utilities\DateTimeParser.cs" />
|
||||
<Compile Include="Utilities\DynamicProxy.cs" />
|
||||
<Compile Include="Linq\JPath.cs" />
|
||||
<Compile Include="Linq\JRaw.cs" />
|
||||
<Compile Include="Required.cs" />
|
||||
<Compile Include="Serialization\JsonDynamicContract.cs" />
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
<Compile Include="Converters\DataSetConverter.cs" />
|
||||
<Compile Include="Converters\DataTableConverter.cs" />
|
||||
<Compile Include="Converters\DateTimeConverterBase.cs" />
|
||||
<Compile Include="Converters\DiscriminatedUnionConverter.cs" />
|
||||
<Compile Include="Converters\EntityKeyMemberConverter.cs" />
|
||||
<Compile Include="Converters\ExpandoObjectConverter.cs" />
|
||||
<Compile Include="Converters\IsoDateTimeConverter.cs" />
|
||||
@@ -107,11 +108,19 @@
|
||||
<Compile Include="Linq\JContainer.cs" />
|
||||
<Compile Include="Linq\JEnumerable.cs" />
|
||||
<Compile Include="Linq\JObject.cs" />
|
||||
<Compile Include="Linq\JPath.cs" />
|
||||
<Compile Include="Linq\JProperty.cs" />
|
||||
<Compile Include="Linq\JPropertyDescriptor.cs" />
|
||||
<Compile Include="Linq\JPropertyKeyedCollection.cs" />
|
||||
<Compile Include="Linq\JRaw.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArrayIndexFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArrayMultipleIndexFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArraySliceFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\FieldFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPath.cs" />
|
||||
<Compile Include="Linq\JsonPath\PathFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryExpression.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ScanFilter.cs" />
|
||||
<Compile Include="Linq\JToken.cs" />
|
||||
<Compile Include="Linq\JTokenEqualityComparer.cs" />
|
||||
<Compile Include="Linq\JTokenReader.cs" />
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
<Compile Include="Converters\DataSetConverter.cs" />
|
||||
<Compile Include="Converters\DataTableConverter.cs" />
|
||||
<Compile Include="Converters\DateTimeConverterBase.cs" />
|
||||
<Compile Include="Converters\DiscriminatedUnionConverter.cs" />
|
||||
<Compile Include="Converters\EntityKeyMemberConverter.cs" />
|
||||
<Compile Include="Converters\ExpandoObjectConverter.cs" />
|
||||
<Compile Include="Converters\IsoDateTimeConverter.cs" />
|
||||
@@ -112,11 +113,19 @@
|
||||
<Compile Include="Linq\JContainer.cs" />
|
||||
<Compile Include="Linq\JEnumerable.cs" />
|
||||
<Compile Include="Linq\JObject.cs" />
|
||||
<Compile Include="Linq\JPath.cs" />
|
||||
<Compile Include="Linq\JProperty.cs" />
|
||||
<Compile Include="Linq\JPropertyDescriptor.cs" />
|
||||
<Compile Include="Linq\JPropertyKeyedCollection.cs" />
|
||||
<Compile Include="Linq\JRaw.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArrayIndexFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArrayMultipleIndexFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ArraySliceFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\FieldFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\JPath.cs" />
|
||||
<Compile Include="Linq\JsonPath\PathFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryExpression.cs" />
|
||||
<Compile Include="Linq\JsonPath\QueryFilter.cs" />
|
||||
<Compile Include="Linq\JsonPath\ScanFilter.cs" />
|
||||
<Compile Include="Linq\JToken.cs" />
|
||||
<Compile Include="Linq\JTokenEqualityComparer.cs" />
|
||||
<Compile Include="Linq\JTokenReader.cs" />
|
||||
|
||||
@@ -91,5 +91,5 @@ using System.Security;
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("4.5.0.0")]
|
||||
[assembly: AssemblyFileVersion("5.0.8.16801")]
|
||||
[assembly: AssemblyFileVersion("5.0.8.16808")]
|
||||
[assembly: CLSCompliant(true)]
|
||||
|
||||
@@ -44,7 +44,6 @@ using Newtonsoft.Json.Utilities;
|
||||
using Newtonsoft.Json.Utilities.LinqBridge;
|
||||
#else
|
||||
using System.Linq;
|
||||
|
||||
#endif
|
||||
|
||||
namespace Newtonsoft.Json.Serialization
|
||||
|
||||
@@ -232,10 +232,10 @@ namespace Newtonsoft.Json.Utilities
|
||||
|
||||
public static TimeSpan ParseTimeSpan(string input)
|
||||
{
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
return TimeSpan.Parse((string)input, CultureInfo.InvariantCulture);
|
||||
#if !(NET35 || NET20)
|
||||
return TimeSpan.Parse(input, CultureInfo.InvariantCulture);
|
||||
#else
|
||||
return TimeSpan.Parse((string)input);
|
||||
return TimeSpan.Parse(input);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user