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

◆ CannonicalizeElement()

XmlSchemaParticle System.Xml.Schema.Compiler.CannonicalizeElement ( XmlSchemaElement element)
inlineprivate

Definition at line 1135 of file Compiler.cs.

1136 {
1137 if (!element.RefName.IsEmpty && (element.ElementDecl.Block & XmlSchemaDerivationMethod.Substitution) == 0)
1138 {
1139 XmlSchemaSubstitutionGroup xmlSchemaSubstitutionGroup = (XmlSchemaSubstitutionGroup)_examplars[element.QualifiedName];
1140 if (xmlSchemaSubstitutionGroup == null)
1141 {
1142 return element;
1143 }
1144 XmlSchemaChoice xmlSchemaChoice = new XmlSchemaChoice();
1145 for (int i = 0; i < xmlSchemaSubstitutionGroup.Members.Count; i++)
1146 {
1147 xmlSchemaChoice.Items.Add((XmlSchemaElement)xmlSchemaSubstitutionGroup.Members[i]);
1148 }
1149 xmlSchemaChoice.MinOccurs = element.MinOccurs;
1150 xmlSchemaChoice.MaxOccurs = element.MaxOccurs;
1152 return xmlSchemaChoice;
1153 }
1154 return element;
1155 }
void Add(TKey key, TValue value)
readonly XmlSchemaObjectTable _examplars
Definition Compiler.cs:24
void CopyPosition(XmlSchemaAnnotated to, XmlSchemaAnnotated from, bool copyParent)
Definition Compiler.cs:2758

References System.Xml.Schema.Compiler._examplars, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Schema.SchemaElementDecl.Block, System.Xml.Schema.Compiler.CopyPosition(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Dictionary, System.Xml.Schema.XmlSchemaElement.ElementDecl, System.Xml.XmlQualifiedName.IsEmpty, System.Xml.Schema.XmlSchemaParticle.MaxOccurs, System.Xml.Schema.XmlSchemaParticle.MinOccurs, System.Xml.Schema.XmlSchemaElement.QualifiedName, and System.Xml.Schema.XmlSchemaElement.RefName.

Referenced by System.Xml.Schema.Compiler.IsValidRestriction().