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

◆ CannonicalizeSequence()

XmlSchemaParticle System.Xml.Schema.SchemaCollectionCompiler.CannonicalizeSequence ( XmlSchemaSequence sequence,
bool root,
bool substitution )
inlineprivate

Definition at line 1163 of file SchemaCollectionCompiler.cs.

1164 {
1165 if (sequence.Items.Count > 0)
1166 {
1167 XmlSchemaSequence xmlSchemaSequence = new XmlSchemaSequence();
1170 for (int i = 0; i < sequence.Items.Count; i++)
1171 {
1172 XmlSchemaParticle xmlSchemaParticle = CannonicalizeParticle((XmlSchemaParticle)sequence.Items[i], root: false, substitution);
1173 if (xmlSchemaParticle == XmlSchemaParticle.Empty)
1174 {
1175 continue;
1176 }
1177 if (xmlSchemaParticle.MinOccurs == 1m && xmlSchemaParticle.MaxOccurs == 1m && xmlSchemaParticle is XmlSchemaSequence)
1178 {
1179 XmlSchemaSequence xmlSchemaSequence2 = (XmlSchemaSequence)xmlSchemaParticle;
1180 for (int j = 0; j < xmlSchemaSequence2.Items.Count; j++)
1181 {
1183 }
1184 }
1185 else
1186 {
1188 }
1189 }
1191 }
1192 if (sequence.Items.Count == 0)
1193 {
1194 return XmlSchemaParticle.Empty;
1195 }
1196 if (!root && sequence.Items.Count == 1 && sequence.MinOccurs == 1m && sequence.MaxOccurs == 1m)
1197 {
1198 return (XmlSchemaParticle)sequence.Items[0];
1199 }
1200 return sequence;
1201 }
void Add(TKey key, TValue value)
XmlSchemaParticle CannonicalizeParticle(XmlSchemaParticle particle, bool root, bool substitution)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Schema.SchemaCollectionCompiler.CannonicalizeParticle(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Dictionary, and System.Xml.Schema.XmlSchemaParticle.Empty.

Referenced by System.Xml.Schema.SchemaCollectionCompiler.CannonicalizeParticle().