private string TypeAlias(string type)
{
type = type.SanitizeType();
if (type == "Byte[]")
return TypeAliases["Byte[]"];
var arrParts = type.SplitOnFirst('[');
if (arrParts.Length > 1)
return "{0}[]".Fmt(TypeAlias(arrParts[0]));
string typeAlias;
TypeAliases.TryGetValue(type, out typeAlias);
return typeAlias ?? NameOnly(type);
}