src/Misc/EFTools/XmlCore/Model/Validation/AttributeContentValidator.cs
/// <summary>
///     Returns the XmlSchemaAttribute from the given XmlSchemaComplexType
/// </summary>
/// <param name="xsct"></param>
/// <param name="qname"></param>
/// <returns></returns>
Returns the XmlSchemaAttribute from the given XmlSchemaComplexType
Returns the XmlSchemaAttribute from the given XmlSchemaComplexType
private XmlSchemaAttribute GetXmlSchemaAttributeFromXmlSchemaGroupBase(XmlSchemaComplexType xsct, XmlQualifiedName qname)
        {
            if (xsct == null)
            {
                throw new ArgumentNullException("xsct");
            }
            if (qname == null)
            {
                throw new ArgumentNullException("qname");
            }
            var attr = GetXmlSchemaAttributeFromAttributeCollection(xsct.Attributes, qname);
            if (attr == null)
            {
                if (xsct.ContentModel != null)
                {
                    var complexContentExtension = xsct.ContentModel.Content as XmlSchemaComplexContentExtension;
                    if (complexContentExtension != null)
                    {
                        attr = GetXmlSchemaAttributeFromAttributeCollection(complexContentExtension.Attributes, qname);
                    }
                }
            }
            if (attr == null)
            {
                var baseXsct = xsct.BaseXmlSchemaType as XmlSchemaComplexType;
                if (baseXsct != null)
                {
                    attr = GetXmlSchemaAttributeFromXmlSchemaGroupBase(baseXsct, qname);
                }
            }
            return attr;
        }
private XmlSchemaAttribute GetXmlSchemaAttributeFromXmlSchemaGroupBase ( XmlSchemaComplexType xsct , XmlQualifiedName qname ) { if ( xsct == null ) { throw new ArgumentNullException ( " " ) ; } if ( qname == null ) { throw new ArgumentNullException ( " " ) ; } var attr = GetXmlSchemaAttributeFromAttributeCollection ( xsct . Attributes , qname ) ; if ( attr == null ) { if ( xsct . ContentModel != null ) { var complexContentExtension = xsct . ContentModel . Content as XmlSchemaComplexContentExtension ; if ( complexContentExtension != null ) { attr = GetXmlSchemaAttributeFromAttributeCollection ( complexContentExtension . Attributes , qname ) ; } } } if ( attr == null ) { var baseXsct = xsct . BaseXmlSchemaType as XmlSchemaComplexType ; if ( baseXsct != null ) { attr = GetXmlSchemaAttributeFromXmlSchemaGroupBase ( baseXsct , qname ) ; } } return attr ; }
Returns the XmlSchemaAttribute from the given XmlSchemaComplexType
Returns the XmlSchemaAttribute from the given XmlSchemaComplexType
None
xsct
XmlSchemaComplexType
None
qname
XmlQualifiedName
None