Exemplo n.º 1
0
 public DocumentationEntry(string typeName, string propertyName, Type propertyType, string content)
 {
     this.typeName         = typeName;
     this.propertyName     = propertyName;
     this.propertyTypeName = TypeNameFormatter.FormatTypeForDefaultLanguage(propertyType, false);
     this.content          = content;
 }
Exemplo n.º 2
0
        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 + "?");
        }