-Added TypeNameAssemblyFormatHandling
-Added TypeNameAssemblyFormatHandling properties to JsonSerializer and JsonSerializerSettings -Changed TypeNameAssemblyFormat properties on JsonSerializer and JsonSerializerSettings to obsolete
This commit is contained in:
@@ -50,16 +50,16 @@ namespace Newtonsoft.Json.Tests.Utilities
|
||||
{
|
||||
string typeName;
|
||||
|
||||
typeName = ReflectionUtils.GetTypeName(typeof(IList<Type>), FormatterAssemblyStyle.Simple, null);
|
||||
typeName = ReflectionUtils.GetTypeName(typeof(IList<Type>), TypeNameAssemblyFormatHandling.Simple, null);
|
||||
Assert.AreEqual("System.Collections.Generic.IList`1[[System.Type, mscorlib]], mscorlib", typeName);
|
||||
|
||||
typeName = ReflectionUtils.GetTypeName(typeof(IDictionary<IList<Type>, IList<Type>>), FormatterAssemblyStyle.Simple, null);
|
||||
typeName = ReflectionUtils.GetTypeName(typeof(IDictionary<IList<Type>, IList<Type>>), TypeNameAssemblyFormatHandling.Simple, null);
|
||||
Assert.AreEqual("System.Collections.Generic.IDictionary`2[[System.Collections.Generic.IList`1[[System.Type, mscorlib]], mscorlib],[System.Collections.Generic.IList`1[[System.Type, mscorlib]], mscorlib]], mscorlib", typeName);
|
||||
|
||||
typeName = ReflectionUtils.GetTypeName(typeof(IList<>), FormatterAssemblyStyle.Simple, null);
|
||||
typeName = ReflectionUtils.GetTypeName(typeof(IList<>), TypeNameAssemblyFormatHandling.Simple, null);
|
||||
Assert.AreEqual("System.Collections.Generic.IList`1, mscorlib", typeName);
|
||||
|
||||
typeName = ReflectionUtils.GetTypeName(typeof(IDictionary<,>), FormatterAssemblyStyle.Simple, null);
|
||||
typeName = ReflectionUtils.GetTypeName(typeof(IDictionary<,>), TypeNameAssemblyFormatHandling.Simple, null);
|
||||
Assert.AreEqual("System.Collections.Generic.IDictionary`2, mscorlib", typeName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user