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

◆ CountGroupSelfReference()

int System.Xml.Schema.SchemaCollectionPreprocessor.CountGroupSelfReference ( XmlSchemaObjectCollection items,
XmlQualifiedName name )
inlineprivate

Definition at line 667 of file SchemaCollectionPreprocessor.cs.

668 {
669 int num = 0;
670 for (int i = 0; i < items.Count; i++)
671 {
672 if (items[i] is XmlSchemaGroupRef xmlSchemaGroupRef)
673 {
674 if (xmlSchemaGroupRef.RefName == name)
675 {
676 if (xmlSchemaGroupRef.MinOccurs != 1m || xmlSchemaGroupRef.MaxOccurs != 1m)
677 {
679 }
680 num++;
681 }
682 }
683 else if (items[i] is XmlSchemaGroupBase)
684 {
685 num += CountGroupSelfReference(((XmlSchemaGroupBase)items[i]).Items, name);
686 }
687 if (num > 1)
688 {
689 break;
690 }
691 }
692 return num;
693 }
static string Sch_MinMaxGroupRedefine
Definition SR.cs:824
Definition SR.cs:7
void SendValidationEvent(string code, XmlSchemaObject source)
int CountGroupSelfReference(XmlSchemaObjectCollection items, XmlQualifiedName name)

References System.Collections.CollectionBase.Count, System.Xml.Schema.SchemaCollectionPreprocessor.CountGroupSelfReference(), System.SR.Sch_MinMaxGroupRedefine, and System.Xml.Schema.BaseProcessor.SendValidationEvent().

Referenced by System.Xml.Schema.SchemaCollectionPreprocessor.CheckRefinedGroup(), and System.Xml.Schema.SchemaCollectionPreprocessor.CountGroupSelfReference().