public static string GetTypeCategoryDisplayString(ReflectionUtil.TypeCategory type) { if (type == ReflectionUtil.TypeCategory.StaticClass) { return("static class"); } else if (type == ReflectionUtil.TypeCategory.AbstractClass) { return("abstract class"); } else if (type == ReflectionUtil.TypeCategory.Class) { return("class"); } else if (type == ReflectionUtil.TypeCategory.Enum) { return("enum"); } else if (type == ReflectionUtil.TypeCategory.Interface) { return("interface"); } else if (type == ReflectionUtil.TypeCategory.Struct) { return("struct"); } else { return(""); } }
public TypeInfo(Type type) { this.Type = type; this.TypeCategory = ReflectionUtil.GetTypeCategory(type); this.Label = ReflectionUtil.GetTypeCategoryDisplayString(type) + " " + ReflectionUtil.GetNiceTypeName(type); }