System.Xml.DocumentSchemaValidator.GetComplexType C# (CSharp) Méthode

GetComplexType() private méthode

private GetComplexType ( XmlSchemaObject schemaObject ) : XmlSchemaComplexType
schemaObject System.Xml.Schema.XmlSchemaObject
Résultat System.Xml.Schema.XmlSchemaComplexType
        private XmlSchemaComplexType GetComplexType(XmlSchemaObject schemaObject)
        {
            if (schemaObject == null)
            {
                return null;
            }
            XmlSchemaElement schemaElement = schemaObject as XmlSchemaElement;
            XmlSchemaComplexType complexType = null;
            if (schemaElement != null)
            {
                complexType = schemaElement.ElementSchemaType as XmlSchemaComplexType;
            }
            else
            {
                complexType = schemaObject as XmlSchemaComplexType;
            }
            return complexType;
        }