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

◆ CalculateSequenceRange()

void System.Xml.Schema.SchemaCollectionCompiler.CalculateSequenceRange ( XmlSchemaSequence sequence,
out decimal minOccurs,
out decimal maxOccurs )
inlineprivate

Definition at line 1437 of file SchemaCollectionCompiler.cs.

1438 {
1439 minOccurs = default(decimal);
1440 maxOccurs = default(decimal);
1441 for (int i = 0; i < sequence.Items.Count; i++)
1442 {
1443 XmlSchemaParticle xmlSchemaParticle = (XmlSchemaParticle)sequence.Items[i];
1444 minOccurs += xmlSchemaParticle.MinOccurs;
1445 if (xmlSchemaParticle.MaxOccurs == decimal.MaxValue)
1446 {
1447 maxOccurs = decimal.MaxValue;
1448 }
1449 else if (maxOccurs != decimal.MaxValue)
1450 {
1451 maxOccurs += xmlSchemaParticle.MaxOccurs;
1452 }
1453 }
1454 minOccurs *= sequence.MinOccurs;
1455 if (sequence.MaxOccurs == decimal.MaxValue)
1456 {
1457 maxOccurs = decimal.MaxValue;
1458 }
1459 else if (maxOccurs != decimal.MaxValue)
1460 {
1461 maxOccurs *= sequence.MaxOccurs;
1462 }
1463 }

References System.Collections.Generic.Dictionary< TKey, TValue >.Count.

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