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

◆ CompileAttributeGroup()

void System.Xml.Schema.SchemaCollectionCompiler.CompileAttributeGroup ( XmlSchemaAttributeGroup attributeGroup)
inlineprivate

Definition at line 1597 of file SchemaCollectionCompiler.cs.

1598 {
1599 if (attributeGroup.IsProcessing)
1600 {
1602 }
1603 else
1604 {
1605 if (attributeGroup.AttributeUses.Count > 0)
1606 {
1607 return;
1608 }
1610 XmlSchemaAnyAttribute xmlSchemaAnyAttribute = attributeGroup.AnyAttribute;
1611 for (int i = 0; i < attributeGroup.Attributes.Count; i++)
1612 {
1613 if (attributeGroup.Attributes[i] is XmlSchemaAttribute xmlSchemaAttribute)
1614 {
1615 if (xmlSchemaAttribute.Use != XmlSchemaUse.Prohibited)
1616 {
1618 }
1619 if (attributeGroup.AttributeUses[xmlSchemaAttribute.QualifiedName] == null)
1620 {
1621 attributeGroup.AttributeUses.Add(xmlSchemaAttribute.QualifiedName, xmlSchemaAttribute);
1622 }
1623 else
1624 {
1626 }
1627 continue;
1628 }
1629 XmlSchemaAttributeGroupRef xmlSchemaAttributeGroupRef = (XmlSchemaAttributeGroupRef)attributeGroup.Attributes[i];
1630 XmlSchemaAttributeGroup xmlSchemaAttributeGroup = ((attributeGroup.Redefined == null || !(xmlSchemaAttributeGroupRef.RefName == attributeGroup.Redefined.QualifiedName)) ? ((XmlSchemaAttributeGroup)_schema.AttributeGroups[xmlSchemaAttributeGroupRef.RefName]) : attributeGroup.Redefined);
1631 if (xmlSchemaAttributeGroup != null)
1632 {
1634 foreach (XmlSchemaAttribute value in xmlSchemaAttributeGroup.AttributeUses.Values)
1635 {
1636 if (attributeGroup.AttributeUses[value.QualifiedName] == null)
1637 {
1638 attributeGroup.AttributeUses.Add(value.QualifiedName, value);
1639 }
1640 else
1641 {
1642 SendValidationEvent(System.SR.Sch_DupAttributeUse, value.QualifiedName.ToString(), value);
1643 }
1644 }
1646 }
1647 else
1648 {
1650 }
1651 }
1654 }
1655 }
void Add(TKey key, TValue value)
static string Sch_UndefAttributeGroupRef
Definition SR.cs:1044
static string Sch_DupAttributeUse
Definition SR.cs:986
static string Sch_AttributeGroupCircularRef
Definition SR.cs:1042
Definition SR.cs:7
void SendValidationEvent(string code, XmlSchemaObject source)
void CompileAttributeGroup(XmlSchemaAttributeGroup attributeGroup)
XmlSchemaAnyAttribute CompileAnyAttributeIntersection(XmlSchemaAnyAttribute a, XmlSchemaAnyAttribute b)
XmlSchemaObjectTable AttributeGroups
Definition XmlSchema.cs:243

References System.Xml.Schema.SchemaCollectionCompiler._schema, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Schema.XmlSchema.AttributeGroups, System.Xml.Schema.SchemaCollectionCompiler.CompileAnyAttributeIntersection(), System.Xml.Schema.SchemaCollectionCompiler.CompileAttribute(), System.Xml.Schema.SchemaCollectionCompiler.CompileAttributeGroup(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Dictionary, System.SR.Sch_AttributeGroupCircularRef, System.SR.Sch_DupAttributeUse, System.SR.Sch_UndefAttributeGroupRef, System.Xml.Schema.BaseProcessor.SendValidationEvent(), System.value, and System.Collections.Generic.Dictionary< TKey, TValue >.Values.

Referenced by System.Xml.Schema.SchemaCollectionCompiler.Compile(), System.Xml.Schema.SchemaCollectionCompiler.CompileAttributeGroup(), and System.Xml.Schema.SchemaCollectionCompiler.CompileLocalAttributes().