ServiceStack.NativeTypes.CSharp.CSharpGenerator.TypeAlias C# (CSharp) Method

TypeAlias() public static method

public static TypeAlias ( string type, bool includeNested = false ) : string
type string
includeNested bool
return string
        public static string TypeAlias(string type, bool includeNested = false)
        {
            type = type.SanitizeType();
            var arrParts = type.SplitOnFirst('[');
            if (arrParts.Length > 1)
                return $"{TypeAlias(arrParts[0], includeNested: includeNested)}[]";

            string typeAlias;
            TypeAliases.TryGetValue(type, out typeAlias);

            return typeAlias ?? NameOnly(type, includeNested: includeNested);
        }