internal static String InternalGetTypeNameFromQualifiedTypeName(String qualifiedTypeName)
{
if (qualifiedTypeName == null)
throw new ArgumentNullException("qualifiedTypeName");
String decodedName = InternalGetClrTypeNameFromQualifiedTypeName(qualifiedTypeName);
if (decodedName != null)
{
return decodedName;
}
int index = IsSoapType(qualifiedTypeName);
if (index != -1)
{
// This is a soap type name. We need to parse it and try to
// find the actual type. Format is "soap:xmlTypeName, xmlTypeNamespace"
String xmlTypeName = qualifiedTypeName.Substring(5, index - 5);
// +2 is to skip the comma and following space
String xmlTypeNamespace =
qualifiedTypeName.Substring(index + 2, qualifiedTypeName.Length - (index + 2));
decodedName = InternalGetSoapTypeNameFromQualifiedTypeName(xmlTypeName, xmlTypeNamespace);
if (decodedName != null)
{
return decodedName;
}
}
//no prefix return same
return qualifiedTypeName;
}