Skip to content

Commit

Permalink
use char instead of strings in GetPrettyName
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Jan 10, 2024
1 parent 08eb736 commit 102bd0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Wolverine/Util/WolverineMessageNaming.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ public static string GetPrettyName(this Type t)

var sb = new StringBuilder();

sb.Append(t.Name.Substring(0, t.Name.LastIndexOf("`", StringComparison.Ordinal)));
sb.Append(t.Name[..t.Name.LastIndexOf('`')]);
sb.Append(t.GetTypeInfo().GetGenericArguments().Aggregate("<",
(aggregate, type) => aggregate + (aggregate == "<" ? "" : ",") + GetPrettyName(type)));
sb.Append(">");
sb.Append('>');

return sb.ToString();
}
Expand Down

0 comments on commit 102bd0a

Please sign in to comment.