From e27f7cd9cb02128feccd62ec7fbe322d605042dc Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Sun, 18 Jun 2017 12:42:39 +1200 Subject: [PATCH] -Build --- .../Serialization/TypeNameHandlingTests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Src/Newtonsoft.Json.Tests/Serialization/TypeNameHandlingTests.cs b/Src/Newtonsoft.Json.Tests/Serialization/TypeNameHandlingTests.cs index f06fda57..53581066 100644 --- a/Src/Newtonsoft.Json.Tests/Serialization/TypeNameHandlingTests.cs +++ b/Src/Newtonsoft.Json.Tests/Serialization/TypeNameHandlingTests.cs @@ -2154,9 +2154,8 @@ namespace Newtonsoft.Json.Tests.Serialization [Test] public void SetOldBinderAndSerializationBinderReturnsWrapper() { - var serializer = JsonSerializer.Create(new JsonSerializerSettings() { Binder = new OldBinder() }); - #pragma warning disable CS0618 // Type or member is obsolete + var serializer = JsonSerializer.Create(new JsonSerializerSettings() { Binder = new OldBinder() }); Assert.IsInstanceOf(typeof(OldBinder), serializer.Binder); #pragma warning restore CS0618 // Type or member is obsolete @@ -2182,6 +2181,7 @@ namespace Newtonsoft.Json.Tests.Serialization } } +#pragma warning disable CS0618 // Type or member is obsolete public class OldBinder : SerializationBinder { public override Type BindToType(string assemblyName, string typeName) @@ -2189,6 +2189,7 @@ namespace Newtonsoft.Json.Tests.Serialization return typeof(string); } } +#pragma warning restore CS0618 // Type or member is obsolete #endif }