private static string GetFullName(TypeSpecificationSignature specification) { string baseTypeName = GetFullName(specification.BaseType); var arrayType = specification as ArrayTypeSignature; if (arrayType != null) { return(baseTypeName + '[' + new string(',', arrayType.Dimensions.Count - 1) + ']'); } var szArrayType = specification as SzArrayTypeSignature; if (szArrayType != null) { return(baseTypeName + "[]"); } var pointerType = specification as PointerTypeSignature; if (pointerType != null) { return(baseTypeName + "*"); } var byRefType = specification as ByReferenceTypeSignature; if (byRefType != null) { return(baseTypeName + "&"); } throw new NotSupportedException("Invalid or unsupported type signature: " + specification.FullName + "."); }
private static string GetFullName(TypeSpecificationSignature specification) { string baseTypeName = GetFullName(specification.BaseType); var arrayType = specification as ArrayTypeSignature; if (arrayType != null) return baseTypeName + '[' + new string(',', arrayType.Dimensions.Count - 1) + ']'; var szArrayType = specification as SzArrayTypeSignature; if (szArrayType != null) return baseTypeName + "[]"; var pointerType = specification as PointerTypeSignature; if (pointerType != null) return baseTypeName + "*"; var byRefType = specification as ByReferenceTypeSignature; if (byRefType != null) return baseTypeName + "&"; throw new NotSupportedException("Invalid or unsupported type signature: " + specification.FullName + "."); }