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

◆ GatherGroupChoices() [2/2]

bool System.Xml.Serialization.XmlSchemaImporter.GatherGroupChoices ( XmlSchemaParticle particle,
NameTable choiceElements,
string identifier,
string ns,
ref bool needExplicitOrder,
bool allowDuplicates )
inlineprivate

Definition at line 883 of file XmlSchemaImporter.cs.

884 {
885 if (particle is XmlSchemaGroupRef)
886 {
888 if (!xmlSchemaGroupRef.RefName.IsEmpty)
889 {
892 {
893 RemoveReference(xmlSchemaGroupRef.RefName, base.GroupsInUse);
894 return true;
895 }
896 RemoveReference(xmlSchemaGroupRef.RefName, base.GroupsInUse);
897 }
898 }
899 else if (particle is XmlSchemaGroupBase)
900 {
902 bool flag = xmlSchemaGroupBase.IsMultipleOccurrence;
904 bool duplicateElements = false;
905 for (int i = 0; i < xmlSchemaGroupBase.Items.Count; i++)
906 {
907 object obj = xmlSchemaGroupBase.Items[i];
909 {
911 {
912 flag = true;
913 }
914 }
915 else if (obj is XmlSchemaAny)
916 {
917 if (GenerateOrder)
918 {
920 }
921 else
922 {
924 }
925 }
926 else
927 {
928 if (!(obj is XmlSchemaElement))
929 {
930 continue;
931 }
934 if (topLevelElement != null)
935 {
937 for (int j = 0; j < equivalentElements.Length; j++)
938 {
939 if (equivalentElements[j].IsMultipleOccurrence)
940 {
941 flag = true;
942 }
944 }
945 }
946 if (xmlSchemaElement.IsMultipleOccurrence)
947 {
948 flag = true;
949 }
951 }
952 }
953 if (xmlSchemaAny != null)
954 {
956 }
957 if (!flag && !(xmlSchemaGroupBase is XmlSchemaChoice) && xmlSchemaGroupBase.Items.Count > 1)
958 {
959 flag = true;
960 }
961 return flag;
962 }
963 return false;
964 }
static string XmlCircularGroupReference
Definition SR.cs:1726
Definition SR.cs:7
void RemoveReference(XmlQualifiedName name, NameTable references)
void AddReference(XmlQualifiedName name, NameTable references, string error)
XmlSchemaElement[] GetEquivalentElements(XmlSchemaElement element)
void AddScopeElement(INameScope scope, ElementAccessor element, ref bool duplicateElements, bool allowDuplicates)
ElementAccessor ImportElement(XmlQualifiedName name, Type desiredMappingType, Type baseType)
XmlSchemaGroup FindGroup(XmlQualifiedName name)
bool GatherGroupChoices(XmlSchemaGroup group, NameTable choiceElements, string identifier, string ns, ref bool needExplicitOrder, bool allowDuplicates)
void AddScopeElements(INameScope scope, ElementAccessor[] elements, ref bool duplicateElements, bool allowDuplicates)
ElementAccessor[] ImportAny(XmlSchemaAny any, bool makeElement, string targetNamespace)
XmlSchemaElement GetTopLevelElement(XmlSchemaElement element)

References System.Xml.Serialization.SchemaImporter.AddReference(), System.Xml.Serialization.XmlSchemaImporter.AddScopeElement(), System.Xml.Serialization.XmlSchemaImporter.AddScopeElements(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Dictionary, System.Xml.Serialization.XmlSchemaImporter.FindGroup(), System.Xml.Serialization.XmlSchemaImporter.GatherGroupChoices(), System.Xml.Serialization.XmlSchemaImporter.GenerateOrder, System.Xml.Serialization.XmlSchemaImporter.GetEquivalentElements(), System.Xml.Serialization.XmlSchemaImporter.GetTopLevelElement(), System.Xml.Serialization.XmlSchemaImporter.ImportAny(), System.Xml.Serialization.XmlSchemaImporter.ImportElement(), System.obj, System.Xml.Serialization.SchemaImporter.RemoveReference(), and System.SR.XmlCircularGroupReference.