-Added TypeNameAssemblyFormatHandling

-Added TypeNameAssemblyFormatHandling properties to JsonSerializer and JsonSerializerSettings
-Changed TypeNameAssemblyFormat properties on JsonSerializer and JsonSerializerSettings to obsolete
This commit is contained in:
James Newton-King
2016-09-17 15:57:03 +12:00
parent a0403492ad
commit ca27a0fc3a
17 changed files with 184 additions and 33 deletions
@@ -151,7 +151,7 @@ namespace Newtonsoft.Json.Utilities
return (v != null) ? v.GetType() : null;
}
public static string GetTypeName(Type t, FormatterAssemblyStyle assemblyFormat, SerializationBinder binder)
public static string GetTypeName(Type t, TypeNameAssemblyFormatHandling assemblyFormat, SerializationBinder binder)
{
string fullyQualifiedTypeName;
#if !(NET20 || NET35)
@@ -171,9 +171,9 @@ namespace Newtonsoft.Json.Utilities
switch (assemblyFormat)
{
case FormatterAssemblyStyle.Simple:
case TypeNameAssemblyFormatHandling.Simple:
return RemoveAssemblyDetails(fullyQualifiedTypeName);
case FormatterAssemblyStyle.Full:
case TypeNameAssemblyFormatHandling.Full:
return fullyQualifiedTypeName;
default:
throw new ArgumentOutOfRangeException();