Slightly lighter JSON

This commit is contained in:
Chris Cameron
2018-02-15 15:05:15 -05:00
parent 29e1ef82bb
commit 45d88b1efb

View File

@@ -45,8 +45,16 @@ namespace ICD.Common.Utils.Extensions
if (extends == null)
throw new ArgumentNullException("extends");
string assemblyName = type == null ? null : type.AssemblyQualifiedName;
extends.WriteValue(assemblyName);
string name;
if (type == null)
name = null;
else if (type.IsPrimitive)
name = type.Name;
else
name = type.AssemblyQualifiedName;
extends.WriteValue(name);
}
/// <summary>