private string GetTypeToShow(string typeName) { if (_useBuiltInNames) { string builtInName = typeName.ReplaceWithBuiltInName(); if (builtInName != typeName) { return(builtInName); } } if (_showShortName) { typeName = TypeNameFormatter.GetShortName(typeName); } if (typeName == string.Empty) { return(TypeReference.NoneElement); } if (TypeCache.GetType(_serializedTypeRef.TypeNameAndAssembly) == null) { return(typeName + MissingSuffix); } return(typeName); }
private string GetTypeToShow(string typeName) { if (_useBuiltInNames && TypeNameFormatter.TryReplaceWithBuiltInName(ref typeName, true)) { return(typeName); } if (_showShortName) { typeName = TypeNameFormatter.GetShortName(typeName); } if (typeName == string.Empty) { return(TypeReference.NoneElement); } if (TypeCache.GetType(_serializedTypeRef.TypeNameAndAssembly) == null) { _serializedTypeRef.TryUpdatingTypeUsingGUID(); if (TypeCache.GetType(_serializedTypeRef.TypeNameAndAssembly) == null) { return(typeName + MissingSuffix); } } return(typeName); }
public static string FormatTypeName(Type type) { if (type == (Type)null) { return(string.Empty); } Type nullableType = PlatformTypeHelper.GetNullableType(type); string shortName = TypeNameFormatter.GetShortName(TypeNameFormatter.FormatTypeForDefaultLanguage(nullableType, true)); if (!(nullableType != (Type)null)) { return(shortName); } return(shortName + "?"); }