-Cleaned up preprocessor symbols
This commit is contained in:
@@ -29,7 +29,7 @@ using System.ComponentModel;
|
||||
using System.Collections.Concurrent;
|
||||
#endif
|
||||
using System.Collections.Generic;
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_3
|
||||
using System.Numerics;
|
||||
#endif
|
||||
#if !(NET20 || DNXCORE50)
|
||||
@@ -295,7 +295,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}
|
||||
}
|
||||
|
||||
#if !(PORTABLE || PORTABLE40 || NET20 || NET35)
|
||||
#if !(PORTABLE || NET20 || NET35)
|
||||
[Test]
|
||||
public void LargeIntegerAsString()
|
||||
{
|
||||
@@ -356,7 +356,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
@"Error converting value {null} to type 'System.Boolean'. Path '[0]', line 1, position 3.");
|
||||
}
|
||||
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
|
||||
#if !(PORTABLE || NET35 || NET20)
|
||||
[Test]
|
||||
public void DeserializeBooleans()
|
||||
{
|
||||
@@ -1022,7 +1022,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
public int ChildId;
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
[Test]
|
||||
public void ReadIntegerWithError()
|
||||
{
|
||||
@@ -1390,7 +1390,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
serializer.TraceWriter = traceWriter;
|
||||
Assert.AreEqual(traceWriter, serializer.TraceWriter);
|
||||
|
||||
#if !(PORTABLE || PORTABLE40 || NET20 || DNXCORE50)
|
||||
#if !(PORTABLE || NET20 || DNXCORE50)
|
||||
#pragma warning disable 618
|
||||
serializer.TypeNameAssemblyFormat = FormatterAssemblyStyle.Full;
|
||||
Assert.AreEqual(FormatterAssemblyStyle.Full, serializer.TypeNameAssemblyFormat);
|
||||
@@ -1505,7 +1505,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
settings.TraceWriter = traceWriter;
|
||||
Assert.AreEqual(traceWriter, settings.TraceWriter);
|
||||
|
||||
#if !(PORTABLE || PORTABLE40 || NET20 || DNXCORE50)
|
||||
#if !(PORTABLE || NET20 || DNXCORE50)
|
||||
#pragma warning disable 618
|
||||
settings.TypeNameAssemblyFormat = FormatterAssemblyStyle.Full;
|
||||
Assert.AreEqual(FormatterAssemblyStyle.Full, settings.TypeNameAssemblyFormat);
|
||||
@@ -1627,7 +1627,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
serializerProxy.TraceWriter = traceWriter;
|
||||
Assert.AreEqual(traceWriter, serializerProxy.TraceWriter);
|
||||
|
||||
#if !(PORTABLE || PORTABLE40 || NET20 || DNXCORE50)
|
||||
#if !(PORTABLE || NET20 || DNXCORE50)
|
||||
#pragma warning disable 618
|
||||
serializerProxy.TypeNameAssemblyFormat = FormatterAssemblyStyle.Full;
|
||||
Assert.AreEqual(FormatterAssemblyStyle.Full, serializerProxy.TypeNameAssemblyFormat);
|
||||
@@ -1648,7 +1648,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
Assert.AreEqual(TypeNameHandling.All, serializerProxy.TypeNameHandling);
|
||||
}
|
||||
|
||||
#if !(PORTABLE || PORTABLE40 || DNXCORE50)
|
||||
#if !(PORTABLE || DNXCORE50)
|
||||
[Test]
|
||||
public void DeserializeISerializableIConvertible()
|
||||
{
|
||||
@@ -2811,7 +2811,7 @@ keyword such as type of business.""
|
||||
ConverableMembers c = JsonConvert.DeserializeObject<ConverableMembers>(json);
|
||||
Assert.AreEqual("string", c.String);
|
||||
Assert.AreEqual(double.MaxValue, c.Double);
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50)
|
||||
Assert.AreEqual(DBNull.Value, c.DBNull);
|
||||
#endif
|
||||
}
|
||||
@@ -4062,7 +4062,7 @@ Path '', line 1, position 1.");
|
||||
@"Unexpected character encountered while parsing value: [. Path '', line 1, position 1.");
|
||||
}
|
||||
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
#if !(NET35 || NET20)
|
||||
[Test]
|
||||
public void CannotDeserializeArrayIntoDynamic()
|
||||
{
|
||||
@@ -4158,7 +4158,7 @@ Path '', line 1, position 1.");
|
||||
{
|
||||
ContractResolver = new DefaultContractResolver
|
||||
{
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_1
|
||||
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
|
||||
IgnoreSerializableAttribute = true
|
||||
#endif
|
||||
}
|
||||
@@ -4175,7 +4175,7 @@ Path '', line 1, position 1.");
|
||||
{
|
||||
ContractResolver = new DefaultContractResolver
|
||||
{
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_1
|
||||
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
|
||||
IgnoreSerializableAttribute = true
|
||||
#endif
|
||||
}
|
||||
@@ -4192,7 +4192,7 @@ Path '', line 1, position 1.");
|
||||
{
|
||||
ContractResolver = new DefaultContractResolver
|
||||
{
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_1
|
||||
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
|
||||
IgnoreSerializableAttribute = true
|
||||
#endif
|
||||
}
|
||||
@@ -4209,7 +4209,7 @@ Path '', line 1, position 1.");
|
||||
{
|
||||
ContractResolver = new DefaultContractResolver
|
||||
{
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50)
|
||||
IgnoreSerializableAttribute = true
|
||||
#endif
|
||||
}
|
||||
@@ -4984,7 +4984,7 @@ Path '', line 1, position 1.");
|
||||
Assert.AreEqual("value", newModelStateDictionary["key"]);
|
||||
}
|
||||
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_1
|
||||
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
|
||||
#if DEBUG
|
||||
[Test]
|
||||
public void SerializeISerializableInPartialTrustWithIgnoreInterface()
|
||||
@@ -5403,7 +5403,7 @@ Path '', line 1, position 1.");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NET20 || PORTABLE40)
|
||||
#if !(NET20)
|
||||
[Test]
|
||||
public void SerializeDeserializeXNodeProperties()
|
||||
{
|
||||
@@ -5434,7 +5434,7 @@ Path '', line 1, position 1.");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50)
|
||||
[Test]
|
||||
public void SerializeDeserializeXmlNodeProperties()
|
||||
{
|
||||
@@ -5918,7 +5918,7 @@ Path '', line 1, position 1.");
|
||||
}", json);
|
||||
}
|
||||
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
#if !(NET35 || NET20)
|
||||
[Test]
|
||||
public void SerializeExpandoObject()
|
||||
{
|
||||
@@ -6836,7 +6836,7 @@ Path '', line 1, position 1.");
|
||||
}
|
||||
}
|
||||
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50)
|
||||
[Test]
|
||||
public void SerializeException1()
|
||||
{
|
||||
@@ -8014,7 +8014,7 @@ Path '', line 1, position 1.");
|
||||
Assert.AreEqual("", s);
|
||||
}
|
||||
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_1
|
||||
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
|
||||
[Test]
|
||||
public void SerializeAndDeserializeWithAttributes()
|
||||
{
|
||||
@@ -8217,7 +8217,7 @@ lines.*/
|
||||
ExceptionAssert.Throws<JsonReaderException>(() => { s.Deserialize<Dictionary<string, int>>(new JsonTextReader(new StringReader(json))); }, "Additional text encountered after finished reading JSON content: {. Path '', line 7, position 0.");
|
||||
}
|
||||
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50)
|
||||
[Test]
|
||||
public void DeserializeException()
|
||||
{
|
||||
@@ -8445,8 +8445,8 @@ This is just junk, though.";
|
||||
Assert.AreEqual("[1.1,0.0,0.0]", json);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || NET40 || PORTABLE40)
|
||||
#if !PORTABLE || NETSTANDARD1_1
|
||||
#if !(NET20 || NET35 || NET40)
|
||||
#if !PORTABLE || NETSTANDARD1_3
|
||||
[Test]
|
||||
public void DeserializeReadOnlyListWithBigInteger()
|
||||
{
|
||||
@@ -8504,7 +8504,7 @@ This is just junk, though.";
|
||||
|
||||
Action doStuff = () => { obj = JsonConvert.DeserializeObject<MyTuple<int>>(json); };
|
||||
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50)
|
||||
doStuff();
|
||||
Assert.AreEqual(500, obj.Item1);
|
||||
#else
|
||||
@@ -8535,7 +8535,7 @@ This is just junk, though.";
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(PORTABLE || NET35 || NET20 || PORTABLE40 || DNXCORE50)
|
||||
#if !(PORTABLE || NET35 || NET20 || DNXCORE50)
|
||||
[Test]
|
||||
public void SerializeTupleWithSerializableAttribute()
|
||||
{
|
||||
@@ -8753,7 +8753,7 @@ This is just junk, though.";
|
||||
ExceptionAssert.Throws<JsonSerializationException>(() => JsonConvert.DeserializeObject<NoConstructorReadOnlyCollection<int>>("[1]"), "Cannot deserialize readonly or fixed size list: Newtonsoft.Json.Tests.Serialization.JsonSerializerTest+NoConstructorReadOnlyCollection`1[System.Int32]. Path '', line 1, position 1.");
|
||||
}
|
||||
|
||||
#if !(NET40 || NET35 || NET20 || PORTABLE40)
|
||||
#if !(NET40 || NET35 || NET20)
|
||||
public class NoConstructorReadOnlyDictionary<TKey, TValue> : ReadOnlyDictionary<TKey, TValue>
|
||||
{
|
||||
public NoConstructorReadOnlyDictionary()
|
||||
@@ -8769,7 +8769,7 @@ This is just junk, though.";
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(PORTABLE || NET35 || NET20 || PORTABLE40) || NETSTANDARD1_1
|
||||
#if !(PORTABLE || NET35 || NET20) || NETSTANDARD1_3
|
||||
[Test]
|
||||
public void ReadTooLargeInteger()
|
||||
{
|
||||
@@ -8812,7 +8812,7 @@ This is just junk, though.";
|
||||
|
||||
Assert.AreEqual(@"{""First"":""One"",""Second"":2}", json);
|
||||
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_1
|
||||
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
|
||||
DefaultContractResolver r = new DefaultContractResolver();
|
||||
r.IgnoreSerializableAttribute = false;
|
||||
|
||||
@@ -8928,7 +8928,7 @@ This is just junk, though.";
|
||||
Assert.AreEqual(1234567890.123456m, d);
|
||||
}
|
||||
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_1
|
||||
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
|
||||
[Test]
|
||||
public void DontSerializeStaticFields()
|
||||
{
|
||||
@@ -8952,7 +8952,7 @@ This is just junk, though.";
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_3
|
||||
[Test]
|
||||
public void SerializeBigInteger()
|
||||
{
|
||||
@@ -9092,7 +9092,7 @@ This is just junk, though.";
|
||||
]", json);
|
||||
}
|
||||
|
||||
#if !(PORTABLE || PORTABLE40 || DNXCORE50)
|
||||
#if !(PORTABLE || DNXCORE50)
|
||||
[Test]
|
||||
public void SerializeDictionaryWithStructKey()
|
||||
{
|
||||
@@ -9109,7 +9109,7 @@ This is just junk, though.";
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(PORTABLE || PORTABLE40 || DNXCORE50) || NETSTANDARD1_0 || NETSTANDARD1_1
|
||||
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_0 || NETSTANDARD1_3
|
||||
[Test]
|
||||
public void SerializeDictionaryWithStructKey_Custom()
|
||||
{
|
||||
@@ -9296,7 +9296,7 @@ This is just junk, though.";
|
||||
Assert.AreEqual(jane, john.Spouse);
|
||||
}
|
||||
|
||||
#if !(NET35 || NET20 || PORTABLE || PORTABLE40)
|
||||
#if !(NET35 || NET20 || PORTABLE)
|
||||
[Test]
|
||||
public void TypeConverterOnInterface()
|
||||
{
|
||||
@@ -9874,7 +9874,7 @@ This is just junk, though.";
|
||||
Assert.AreEqual("derived", d.DerivedProperty);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
[Test]
|
||||
public void DeserializeNullableUnsignedLong()
|
||||
{
|
||||
@@ -10256,7 +10256,7 @@ This is just junk, though.";
|
||||
public string Project { get; }
|
||||
}
|
||||
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_1
|
||||
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
|
||||
public class ISerializableTestObject : ISerializable
|
||||
{
|
||||
internal string _stringValue;
|
||||
|
||||
Reference in New Issue
Block a user