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

◆ IsSequenceFromChoice()

bool System.Xml.Schema.Compiler.IsSequenceFromChoice ( XmlSchemaSequence derivedSequence,
XmlSchemaChoice baseChoice )
inlineprivate

Definition at line 1691 of file Compiler.cs.

1692 {
1693 decimal minOccurs = derivedSequence.MinOccurs * (decimal)derivedSequence.Items.Count;
1694 decimal maxOccurs = ((!(derivedSequence.MaxOccurs == decimal.MaxValue)) ? (derivedSequence.MaxOccurs * (decimal)derivedSequence.Items.Count) : decimal.MaxValue);
1696 {
1697 return false;
1698 }
1699 for (int i = 0; i < derivedSequence.Items.Count; i++)
1700 {
1701 if (GetMappingParticle((XmlSchemaParticle)derivedSequence.Items[i], baseChoice.Items) < 0)
1702 {
1703 return false;
1704 }
1705 }
1706 return true;
1707 }
int GetMappingParticle(XmlSchemaParticle particle, XmlSchemaObjectCollection collection)
Definition Compiler.cs:1723
bool IsValidOccurrenceRangeRestriction(XmlSchemaParticle derivedParticle, XmlSchemaParticle baseParticle)
Definition Compiler.cs:1709

References System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Dictionary, System.Xml.Schema.Compiler.GetMappingParticle(), and System.Xml.Schema.Compiler.IsValidOccurrenceRangeRestriction().

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