-Fix using simple type names on Silverlight

This commit is contained in:
JamesNK
2010-07-16 07:53:27 +00:00
parent 55adae5525
commit 4b5d417659
@@ -57,11 +57,16 @@ namespace Newtonsoft.Json.Utilities
private static string GetSimpleTypeName(Type type)
{
#if !SILVERLIGHT
string fullyQualifiedTypeName = type.FullName + ", " + type.Assembly.GetName().Name;
// for type names with no nested type names then return
if (!type.IsGenericType || type.IsGenericTypeDefinition)
return fullyQualifiedTypeName;
#else
// Assembly.GetName() is marked SecurityCritical
string fullyQualifiedTypeName = type.AssemblyQualifiedName;
#endif
StringBuilder builder = new StringBuilder();