private static Type GetElementTypeInternal(XmlReader reader, string theNamespace) { Type type = null; string attribute = reader.GetAttribute("type", theNamespace); if (attribute != null) { string[] array = attribute.Split(new char[] { ':' }); if (array.Length == 2) { if (!(reader.LookupNamespace(array[0]) == "http://www.w3.org/2001/XMLSchema")) { throw new AdomdUnknownResponseException(XmlaSR.UnexpectedXsiType(attribute), ""); } type = NetTypeMapper.GetNetType(array[1]); } else { type = NetTypeMapper.GetNetType(attribute); } if (type == null) { throw new AdomdUnknownResponseException(XmlaSR.UnexpectedXsiType(attribute), ""); } } return(type); }
public static Type GetNetTypeWithPrefix(string xmlTypeWithPrefix) { int num = xmlTypeWithPrefix.IndexOf(':'); string xmlType; if (num != -1) { xmlType = xmlTypeWithPrefix.Substring(num + 1); } else { xmlType = xmlTypeWithPrefix; } return NetTypeMapper.GetNetType(xmlType); }