Added enum export to documentation generation

This commit is contained in:
penev92
2022-06-12 21:02:25 +03:00
committed by Matthias Mailänder
parent a985452907
commit eda3dfa50f
5 changed files with 140 additions and 59 deletions

View File

@@ -236,6 +236,9 @@ namespace OpenRA.Mods.Common
public static string FriendlyTypeName(Type t)
{
if (t.IsEnum)
return $"{t.Name} (enum)";
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(HashSet<>))
return $"Set of {t.GetGenericArguments().Select(FriendlyTypeName).First()}";