-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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user