Mono.Debugger.Backend.Mono.MonoSymbolFile.GetTypeSignature C# (CSharp) Method

GetTypeSignature() protected static method

protected static GetTypeSignature ( Cecil t ) : string
t Cecil
return string
        protected static string GetTypeSignature(Cecil.TypeReference t)
        {
            Cecil.ReferenceType rtype = t as Cecil.ReferenceType;
            if (rtype != null)
                return GetTypeSignature (rtype.ElementType) + "&";

            Cecil.ArrayType atype = t as Cecil.ArrayType;
            if (atype != null) {
                string etype = GetTypeSignature (atype.ElementType);
                if (atype.Rank > 1)
                    return String.Format ("{0}[{1}]", etype, atype.Rank);
                else
                    return etype + "[]";
            }

            switch (t.FullName) {
            case "System.Char":	return "char";
            case "System.Boolean":	return "bool";
            case "System.Byte":	return "byte";
            case "System.SByte":	return "sbyte";
            case "System.Int16":	return "int16";
            case "System.UInt16":	return "uint16";
            case "System.Int32":	return "int";
            case "System.UInt32":	return "uint";
            case "System.Int64":	return "long";
            case "System.UInt64":	return "ulong";
            case "System.Single":	return "single";
            case "System.Double":	return "double";
            case "System.String":	return "string";
            case "System.Object":	return "object";
            case "System.Decimal":  return "decimal";
            default:		return RemoveGenericArity (t.FullName);
            }
        }