-Removed old PocketPC ifdefs
This commit is contained in:
@@ -82,7 +82,7 @@ namespace Newtonsoft.Json.Tests.Bson
|
||||
Assert.AreEqual("0F-00-00-00-10-42-6C-61-68-00-01-00-00-00-00", bson);
|
||||
}
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
[Test]
|
||||
public void WriteValues()
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !SILVERLIGHT && !PocketPC && !NET20 && !NETFX_CORE
|
||||
#if !SILVERLIGHT && !NET20 && !NETFX_CORE
|
||||
using System.Data.Linq;
|
||||
#endif
|
||||
#if !(SILVERLIGHT || NETFX_CORE)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !SILVERLIGHT && !PocketPC && !NET20 && !NETFX_CORE
|
||||
#if !SILVERLIGHT && !NET20 && !NETFX_CORE
|
||||
using System.Data.Linq;
|
||||
#endif
|
||||
#if !SILVERLIGHT && !NETFX_CORE
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
[Test]
|
||||
public void SerializeDateTimeOffset()
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
Assert.AreEqual("new Date(976918263055)", result);
|
||||
}
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
[Test]
|
||||
public void SerializeDateTimeOffset()
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !SILVERLIGHT && !PocketPC && !NET20 && !NETFX_CORE
|
||||
#if !SILVERLIGHT && !NET20 && !NETFX_CORE
|
||||
using System.Data.Linq;
|
||||
#endif
|
||||
#if !SILVERLIGHT && !NETFX_CORE
|
||||
|
||||
@@ -231,7 +231,7 @@ now brown cow?", '"', true);
|
||||
value = new DateTime(JsonConvert.InitialJavaScriptDateTicks, DateTimeKind.Utc);
|
||||
Assert.AreEqual(@"""\/Date(0)\/""", JsonConvert.ToString((DateTime)value, DateFormatHandling.MicrosoftDateFormat, DateTimeZoneHandling.RoundtripKind));
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
value = new DateTimeOffset(JsonConvert.InitialJavaScriptDateTicks, TimeSpan.Zero);
|
||||
Assert.AreEqual(@"""1970-01-01T00:00:00+00:00""", JsonConvert.ToString(value));
|
||||
|
||||
@@ -280,7 +280,7 @@ now brown cow?", '"', true);
|
||||
int i = JsonConvert.DeserializeObject<int>("1");
|
||||
Assert.AreEqual(1, i);
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
DateTimeOffset d = JsonConvert.DeserializeObject<DateTimeOffset>(@"""\/Date(-59011455539000+0000)\/""");
|
||||
Assert.AreEqual(new DateTimeOffset(new DateTime(100, 1, 1, 1, 1, 1, DateTimeKind.Utc)), d);
|
||||
#endif
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace Newtonsoft.Json.Tests
|
||||
jsonWriter.WriteValue((decimal?)1.1m);
|
||||
jsonWriter.WriteValue((DateTime?)null);
|
||||
jsonWriter.WriteValue((DateTime?)new DateTime(JsonConvert.InitialJavaScriptDateTicks, DateTimeKind.Utc));
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
jsonWriter.WriteValue((DateTimeOffset?)null);
|
||||
jsonWriter.WriteValue((DateTimeOffset?)new DateTimeOffset(JsonConvert.InitialJavaScriptDateTicks, TimeSpan.Zero));
|
||||
#endif
|
||||
@@ -143,7 +143,7 @@ namespace Newtonsoft.Json.Tests
|
||||
string json = sw.ToString();
|
||||
string expected;
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
expected = @"[null,""c"",null,true,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1.1,null,1.1,null,1.1,null,""1970-01-01T00:00:00Z"",null,""1970-01-01T00:00:00+00:00""]";
|
||||
#else
|
||||
expected = @"[null,""c"",null,true,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1.1,null,1.1,null,1.1,null,""1970-01-01T00:00:00Z""]";
|
||||
|
||||
@@ -38,7 +38,7 @@ using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAtt
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
#if !PocketPC && !SILVERLIGHT && !NETFX_CORE
|
||||
#if !SILVERLIGHT && !NETFX_CORE
|
||||
using System.Web.UI;
|
||||
#endif
|
||||
#if NET20
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
[TestFixture]
|
||||
public class JTokenReaderTest : TestFixtureBase
|
||||
{
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
[Test]
|
||||
public void YahooFinance()
|
||||
{
|
||||
|
||||
@@ -233,7 +233,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(2L, (long)new JArray(1, 2, 3)[1]);
|
||||
|
||||
Assert.AreEqual(new DateTime(2000, 12, 20), (DateTime)new JValue(new DateTime(2000, 12, 20)));
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
Assert.AreEqual(new DateTimeOffset(2000, 12, 20, 0, 0, 0, TimeSpan.Zero), (DateTimeOffset)new JValue(new DateTime(2000, 12, 20, 0, 0, 0, DateTimeKind.Utc)));
|
||||
Assert.AreEqual(new DateTimeOffset(2000, 12, 20, 23, 50, 10, TimeSpan.Zero), (DateTimeOffset)new JValue(new DateTimeOffset(2000, 12, 20, 23, 50, 10, TimeSpan.Zero)));
|
||||
Assert.AreEqual(null, (DateTimeOffset?)new JValue((DateTimeOffset?)null));
|
||||
@@ -446,7 +446,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
public void ImplicitCastingTo()
|
||||
{
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue(new DateTime(2000, 12, 20)), (JValue)new DateTime(2000, 12, 20)));
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue(new DateTimeOffset(2000, 12, 20, 23, 50, 10, TimeSpan.Zero)), (JValue)new DateTimeOffset(2000, 12, 20, 23, 50, 10, TimeSpan.Zero)));
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue((DateTimeOffset?)null), (JValue)(DateTimeOffset?)null));
|
||||
#endif
|
||||
|
||||
@@ -565,7 +565,7 @@ keyword such as type of business.""
|
||||
});
|
||||
}
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
[Test]
|
||||
public void ToStringJsonConverter()
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(SILVERLIGHT || PocketPC || NET20 || NET35 || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NET20 || NET35 || NETFX_CORE || PORTABLE)
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
|
||||
@@ -35,8 +35,6 @@ using System.Security;
|
||||
[assembly: AssemblyTitle("Json.NET Tests Windows Phone")]
|
||||
#elif SILVERLIGHT
|
||||
[assembly: AssemblyTitle("Json.NET Tests Silverlight")]
|
||||
#elif PocketPC
|
||||
[assembly: AssemblyTitle("Json.NET Tests Compact")]
|
||||
#elif PORTABLE
|
||||
[assembly: AssemblyTitle("Json.NET Tests Portable")]
|
||||
#elif NETFX_CORE
|
||||
@@ -75,6 +73,4 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("4.5.0.0")]
|
||||
#if !PocketPC
|
||||
[assembly: AssemblyFileVersion("4.5.11.15810")]
|
||||
#endif
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
GenerateSchemaAndSerializeFromType(new CircularReferenceWithIdClass());
|
||||
GenerateSchemaAndSerializeFromType(new ClassWithArray());
|
||||
GenerateSchemaAndSerializeFromType(new ClassWithGuid());
|
||||
#if !NET20 && !PocketPC
|
||||
#if !NET20
|
||||
GenerateSchemaAndSerializeFromType(new NullableDateTimeTestClass());
|
||||
#endif
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
|
||||
@@ -27,7 +27,7 @@ using System;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
#if !(SILVERLIGHT || PocketPC || NET20 || NET35 || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NET20 || NET35 || NETFX_CORE || PORTABLE)
|
||||
using System.Runtime.Serialization.Json;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -209,7 +209,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
{
|
||||
EmitDefaultValueClass c = new EmitDefaultValueClass();
|
||||
|
||||
#if !(SILVERLIGHT || PocketPC || NET20 || NET35 || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NET20 || NET35 || NETFX_CORE || PORTABLE)
|
||||
DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(EmitDefaultValueClass));
|
||||
|
||||
MemoryStream ms = new MemoryStream();
|
||||
|
||||
@@ -28,7 +28,7 @@ using System;
|
||||
using System.Collections.Concurrent;
|
||||
#endif
|
||||
using System.Collections.Generic;
|
||||
#if !SILVERLIGHT && !PocketPC && !NET20 && !NETFX_CORE
|
||||
#if !SILVERLIGHT && !NET20 && !NETFX_CORE
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Configuration;
|
||||
using System.Runtime.CompilerServices;
|
||||
@@ -53,7 +53,7 @@ using System.Collections.ObjectModel;
|
||||
using Newtonsoft.Json.Bson;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json.Converters;
|
||||
#if !PocketPC && !NET20 && !WINDOWS_PHONE
|
||||
#if !NET20 && !WINDOWS_PHONE
|
||||
using System.Runtime.Serialization.Json;
|
||||
#endif
|
||||
using Newtonsoft.Json.Serialization;
|
||||
@@ -173,7 +173,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
|
||||
string jsonText = JsonConvert.SerializeObject(testDictionary);
|
||||
|
||||
#if !PocketPC && !NET20 && !WINDOWS_PHONE
|
||||
#if !NET20 && !WINDOWS_PHONE
|
||||
MemoryStream ms = new MemoryStream();
|
||||
DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Dictionary<string, object>));
|
||||
serializer.WriteObject(ms, testDictionary);
|
||||
@@ -432,7 +432,7 @@ keyword such as type of business.""
|
||||
CollectionAssert.AreEqual(r1, r2);
|
||||
}
|
||||
|
||||
#if !PocketPC && !NET20 && !WINDOWS_PHONE
|
||||
#if !NET20 && !WINDOWS_PHONE
|
||||
[Test]
|
||||
public void Unicode()
|
||||
{
|
||||
@@ -1595,7 +1595,7 @@ keyword such as type of business.""
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
[DataContract]
|
||||
public class DataContractPrivateMembers
|
||||
{
|
||||
@@ -1982,7 +1982,7 @@ keyword such as type of business.""
|
||||
Assert.AreEqual("Product 1", products[0].Name);
|
||||
}
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
[Test]
|
||||
public void DeserializeEmptyStringToNullableDateTime()
|
||||
{
|
||||
@@ -2759,7 +2759,7 @@ Path '', line 1, position 2.",
|
||||
public string Ethnicity { get; set; }
|
||||
}
|
||||
|
||||
#if !NET20 && !PocketPC && !WINDOWS_PHONE
|
||||
#if !NET20 && !WINDOWS_PHONE
|
||||
public class DataContractJsonSerializerTestClass
|
||||
{
|
||||
public TimeSpan TimeSpanProperty { get; set; }
|
||||
@@ -4108,7 +4108,7 @@ To fix this error either change the environment to be fully trusted, change the
|
||||
Assert.AreEqual(null, d[2]);
|
||||
}
|
||||
|
||||
#if !SILVERLIGHT && !NET20 && !PocketPC
|
||||
#if !SILVERLIGHT && !NET20
|
||||
[Test]
|
||||
public void SerializeHashSet()
|
||||
{
|
||||
@@ -4161,7 +4161,7 @@ To fix this error either change the environment to be fully trusted, change the
|
||||
Assert.AreEqual(0, z[1].Prop1.Length);
|
||||
}
|
||||
|
||||
#if !NET20 && !PocketPC && !SILVERLIGHT && !NETFX_CORE
|
||||
#if !NET20 && !SILVERLIGHT && !NETFX_CORE
|
||||
public class StringDictionaryTestClass
|
||||
{
|
||||
public StringDictionary StringDictionaryProperty { get; set; }
|
||||
@@ -4456,7 +4456,7 @@ To fix this error either change the environment to be fully trusted, change the
|
||||
Assert.AreEqual(meh.IDontWork, "meh");
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || PocketPC || NET20 || NETFX_CORE)
|
||||
#if !(SILVERLIGHT || NET20 || NETFX_CORE)
|
||||
[DataContract]
|
||||
public struct StructISerializable : ISerializable
|
||||
{
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !PocketPC
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
@@ -336,5 +335,4 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -26,7 +26,7 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
[DataContract]
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
@@ -27,7 +27,7 @@ using System.ComponentModel;
|
||||
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
#if !PocketPC && !NETFX_CORE
|
||||
#if !NETFX_CORE
|
||||
[Description("DefaultValueAttributeTestClass description!")]
|
||||
#endif
|
||||
public sealed class DefaultValueAttributeTestClass
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !PocketPC && !NET20
|
||||
#if !NET20
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -29,7 +29,7 @@ using System.ComponentModel;
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
[JsonObject(Id = "Person", Title = "Title!", Description = "JsonObjectAttribute description!", MemberSerialization = MemberSerialization.OptIn)]
|
||||
#if !PocketPC && !NETFX_CORE
|
||||
#if !NETFX_CORE
|
||||
[Description("DescriptionAttribute description!")]
|
||||
#endif
|
||||
public class Person
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !PocketPC
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
@@ -78,5 +77,4 @@ namespace Newtonsoft.Json.Tests.TestObjects
|
||||
Member4 = "This value was set after deserialization.";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -23,7 +23,6 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !PocketPC
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
@@ -78,5 +77,4 @@ namespace Newtonsoft.Json.Tests.TestObjects
|
||||
Member4 = "This value was set after deserialization.";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -23,7 +23,6 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !PocketPC
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
@@ -97,5 +96,4 @@ namespace Newtonsoft.Json.Tests.TestObjects
|
||||
errorContext.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
+1
-3
@@ -23,7 +23,6 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !PocketPC
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
@@ -81,5 +80,4 @@ namespace Newtonsoft.Json.Tests.TestObjects
|
||||
Member4 = "This value was set after deserialization.";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user