Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ FastGetElementDecl()

SchemaElementDecl System.Xml.Schema.XmlSchemaValidator.FastGetElementDecl ( XmlQualifiedName elementName,
object particle )
inlineprivate

Definition at line 1510 of file XmlSchemaValidator.cs.

1511 {
1512 SchemaElementDecl schemaElementDecl = null;
1513 if (particle != null)
1514 {
1515 if (particle is XmlSchemaElement xmlSchemaElement)
1516 {
1517 schemaElementDecl = xmlSchemaElement.ElementDecl;
1518 }
1519 else
1520 {
1521 XmlSchemaAny xmlSchemaAny = (XmlSchemaAny)particle;
1522 _processContents = xmlSchemaAny.ProcessContentsCorrect;
1523 }
1524 }
1525 if (schemaElementDecl == null && _processContents != XmlSchemaContentProcessing.Skip)
1526 {
1527 if (_isRoot && _partialValidationType != null)
1528 {
1529 if (_partialValidationType is XmlSchemaElement)
1530 {
1531 XmlSchemaElement xmlSchemaElement2 = (XmlSchemaElement)_partialValidationType;
1532 if (elementName.Equals(xmlSchemaElement2.QualifiedName))
1533 {
1535 }
1536 else
1537 {
1538 SendValidationEvent(System.SR.Sch_SchemaElementNameMismatch, elementName.ToString(), xmlSchemaElement2.QualifiedName.ToString());
1539 }
1540 }
1541 else if (_partialValidationType is XmlSchemaType)
1542 {
1543 XmlSchemaType xmlSchemaType = (XmlSchemaType)_partialValidationType;
1544 schemaElementDecl = xmlSchemaType.ElementDecl;
1545 }
1546 else
1547 {
1549 }
1550 }
1551 else
1552 {
1554 }
1555 }
1556 return schemaElementDecl;
1557 }
static string Sch_ValidateElementInvalidCall
Definition SR.cs:1202
static string Sch_SchemaElementNameMismatch
Definition SR.cs:1196
Definition SR.cs:7
SchemaElementDecl GetElementDecl(XmlQualifiedName qname)
XmlSchemaContentProcessing _processContents

References System.Xml.Schema.XmlSchemaValidator._compiledSchemaInfo, System.Xml.Schema.XmlSchemaValidator._isRoot, System.Xml.Schema.XmlSchemaValidator._partialValidationType, System.Xml.Schema.XmlSchemaValidator._processContents, System.Xml.Dictionary, System.Xml.XmlQualifiedName.Equals(), System.Xml.Schema.SchemaInfo.GetElementDecl(), System.SR.Sch_SchemaElementNameMismatch, System.SR.Sch_ValidateElementInvalidCall, System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(), and System.Xml.XmlQualifiedName.ToString().

Referenced by System.Xml.Schema.XmlSchemaValidator.ValidateElement().