System.Xml.Serialization.XmlSchemaImporter.BaseTypeName C# (CSharp) Method

BaseTypeName() static private method

static private BaseTypeName ( XmlSchemaSimpleType dataType ) : XmlQualifiedName
dataType System.Xml.Schema.XmlSchemaSimpleType
return System.Xml.XmlQualifiedName
        internal static XmlQualifiedName BaseTypeName(XmlSchemaSimpleType dataType)
        {
            XmlSchemaSimpleTypeContent content = dataType.Content;
            if (content is XmlSchemaSimpleTypeRestriction)
            {
                return ((XmlSchemaSimpleTypeRestriction)content).BaseTypeName;
            }
            else if (content is XmlSchemaSimpleTypeList)
            {
                XmlSchemaSimpleTypeList list = (XmlSchemaSimpleTypeList)content;
                if (list.ItemTypeName != null && !list.ItemTypeName.IsEmpty)
                    return list.ItemTypeName;
                if (list.ItemType != null)
                {
                    return BaseTypeName(list.ItemType);
                }
            }
            return new XmlQualifiedName("string", XmlSchema.Namespace);
        }