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

◆ IsCyclicReferencedType()

bool System.Xml.Serialization.XmlSchemaImporter.IsCyclicReferencedType ( XmlSchemaElement element,
List< string > identifiers )
inlineprivate

Definition at line 1350 of file XmlSchemaImporter.cs.

1351 {
1352 if (!element.RefName.IsEmpty)
1353 {
1355 string text = CodeIdentifier.MakeValid(Accessor.UnescapeName(xmlSchemaElement.Name));
1356 foreach (string identifier in identifiers)
1357 {
1358 if (text == identifier)
1359 {
1360 return true;
1361 }
1362 }
1364 XmlSchemaType schemaType = xmlSchemaElement.SchemaType;
1365 if (schemaType is XmlSchemaComplexType)
1366 {
1367 TypeItems typeItems = GetTypeItems(schemaType);
1368 if ((typeItems.Particle is XmlSchemaSequence || typeItems.Particle is XmlSchemaAll) && typeItems.Particle.Items.Count == 1 && typeItems.Particle.Items[0] is XmlSchemaElement)
1369 {
1371 if (xmlSchemaElement2.IsMultipleOccurrence)
1372 {
1374 }
1375 }
1376 }
1377 }
1378 return false;
1379 }
void Add(TKey key, TValue value)
TypeItems GetTypeItems(XmlSchemaType type)
bool IsCyclicReferencedType(XmlSchemaElement element, List< string > identifiers)
XmlSchemaElement FindElement(XmlQualifiedName name)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Serialization.XmlSchemaImporter.FindElement(), System.Xml.Serialization.XmlSchemaImporter.GetTypeItems(), System.Xml.Serialization.XmlSchemaImporter.IsCyclicReferencedType(), System.Xml.XmlQualifiedName.IsEmpty, System.Xml.Serialization.CodeIdentifier.MakeValid(), System.Xml.Schema.XmlSchemaElement.RefName, System.text, and System.Xml.Serialization.Accessor.UnescapeName().

Referenced by System.Xml.Serialization.XmlSchemaImporter.ImportArrayMapping(), and System.Xml.Serialization.XmlSchemaImporter.IsCyclicReferencedType().