Skip to content

Commit

Permalink
-Build
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Jun 18, 2017
1 parent 928eea8 commit e27f7cd
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2154,9 +2154,8 @@ public void ObsoleteBinderThrowsIfISerializationBinderSet()
[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

Expand All @@ -2182,13 +2181,15 @@ public Type BindToType(string assemblyName, string typeName)
}
}

#pragma warning disable CS0618 // Type or member is obsolete
public class OldBinder : SerializationBinder
{
public override Type BindToType(string assemblyName, string typeName)
{
return typeof(string);
}
}
#pragma warning restore CS0618 // Type or member is obsolete
#endif
}

Expand Down

0 comments on commit e27f7cd

Please sign in to comment.