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

◆ CannonicalizeSequence()

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

Definition at line 1283 of file Compiler.cs.

1284 {
1285 if (sequence.Items.Count > 0)
1286 {
1287 XmlSchemaSequence xmlSchemaSequence = new XmlSchemaSequence();
1291 for (int i = 0; i < sequence.Items.Count; i++)
1292 {
1293 XmlSchemaParticle xmlSchemaParticle = CannonicalizeParticle((XmlSchemaParticle)sequence.Items[i], root: false);
1294 if (xmlSchemaParticle == XmlSchemaParticle.Empty)
1295 {
1296 continue;
1297 }
1298 XmlSchemaSequence xmlSchemaSequence2 = xmlSchemaParticle as XmlSchemaSequence;
1299 if (xmlSchemaParticle.MinOccurs == 1m && xmlSchemaParticle.MaxOccurs == 1m && xmlSchemaSequence2 != null)
1300 {
1301 for (int j = 0; j < xmlSchemaSequence2.Items.Count; j++)
1302 {
1304 }
1305 }
1306 else
1307 {
1309 }
1310 }
1312 }
1313 if (sequence.Items.Count == 0)
1314 {
1315 return XmlSchemaParticle.Empty;
1316 }
1317 if (!root && sequence.Items.Count == 1 && sequence.MinOccurs == 1m && sequence.MaxOccurs == 1m)
1318 {
1319 return (XmlSchemaParticle)sequence.Items[0];
1320 }
1321 return sequence;
1322 }
void Add(TKey key, TValue value)
void CopyPosition(XmlSchemaAnnotated to, XmlSchemaAnnotated from, bool copyParent)
Definition Compiler.cs:2758
XmlSchemaParticle CannonicalizeParticle(XmlSchemaParticle particle, bool root)
Definition Compiler.cs:1106

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

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