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

◆ PreprocessRedefine()

void System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessRedefine ( XmlSchemaRedefine redefine)
inlineprivate

Definition at line 548 of file SchemaCollectionPreprocessor.cs.

549 {
550 for (int i = 0; i < redefine.Items.Count; i++)
551 {
552 SetParent(redefine.Items[i], redefine);
553 if (redefine.Items[i] is XmlSchemaGroup xmlSchemaGroup)
554 {
556 if (redefine.Groups[xmlSchemaGroup.QualifiedName] != null)
557 {
559 continue;
560 }
561 AddToTable(redefine.Groups, xmlSchemaGroup.QualifiedName, xmlSchemaGroup);
562 xmlSchemaGroup.Redefined = (XmlSchemaGroup)redefine.Schema.Groups[xmlSchemaGroup.QualifiedName];
563 if (xmlSchemaGroup.Redefined != null)
564 {
566 }
567 else
568 {
570 }
571 }
572 else if (redefine.Items[i] is XmlSchemaAttributeGroup)
573 {
574 XmlSchemaAttributeGroup xmlSchemaAttributeGroup = (XmlSchemaAttributeGroup)redefine.Items[i];
576 if (redefine.AttributeGroups[xmlSchemaAttributeGroup.QualifiedName] != null)
577 {
579 continue;
580 }
581 AddToTable(redefine.AttributeGroups, xmlSchemaAttributeGroup.QualifiedName, xmlSchemaAttributeGroup);
582 xmlSchemaAttributeGroup.Redefined = (XmlSchemaAttributeGroup)redefine.Schema.AttributeGroups[xmlSchemaAttributeGroup.QualifiedName];
583 if (xmlSchemaAttributeGroup.Redefined != null)
584 {
586 }
587 else
588 {
590 }
591 }
592 else if (redefine.Items[i] is XmlSchemaComplexType)
593 {
594 XmlSchemaComplexType xmlSchemaComplexType = (XmlSchemaComplexType)redefine.Items[i];
596 if (redefine.SchemaTypes[xmlSchemaComplexType.QualifiedName] != null)
597 {
599 continue;
600 }
601 AddToTable(redefine.SchemaTypes, xmlSchemaComplexType.QualifiedName, xmlSchemaComplexType);
602 XmlSchemaType xmlSchemaType = (XmlSchemaType)redefine.Schema.SchemaTypes[xmlSchemaComplexType.QualifiedName];
603 if (xmlSchemaType != null)
604 {
605 if (xmlSchemaType is XmlSchemaComplexType)
606 {
609 }
610 else
611 {
613 }
614 }
615 else
616 {
618 }
619 }
620 else
621 {
622 if (!(redefine.Items[i] is XmlSchemaSimpleType))
623 {
624 continue;
625 }
626 XmlSchemaSimpleType xmlSchemaSimpleType = (XmlSchemaSimpleType)redefine.Items[i];
628 if (redefine.SchemaTypes[xmlSchemaSimpleType.QualifiedName] != null)
629 {
631 continue;
632 }
633 AddToTable(redefine.SchemaTypes, xmlSchemaSimpleType.QualifiedName, xmlSchemaSimpleType);
634 XmlSchemaType xmlSchemaType2 = (XmlSchemaType)redefine.Schema.SchemaTypes[xmlSchemaSimpleType.QualifiedName];
635 if (xmlSchemaType2 != null)
636 {
637 if (xmlSchemaType2 is XmlSchemaSimpleType)
638 {
641 }
642 else
643 {
645 }
646 }
647 else
648 {
650 }
651 }
652 }
653 foreach (DictionaryEntry group in redefine.Groups)
654 {
655 redefine.Schema.Groups.Insert((XmlQualifiedName)group.Key, (XmlSchemaObject)group.Value);
656 }
657 foreach (DictionaryEntry attributeGroup in redefine.AttributeGroups)
658 {
659 redefine.Schema.AttributeGroups.Insert((XmlQualifiedName)attributeGroup.Key, (XmlSchemaObject)attributeGroup.Value);
660 }
661 foreach (DictionaryEntry schemaType in redefine.SchemaTypes)
662 {
663 redefine.Schema.SchemaTypes.Insert((XmlQualifiedName)schemaType.Key, (XmlSchemaObject)schemaType.Value);
664 }
665 }
static string Sch_AttrGroupRedefineNotFound
Definition SR.cs:810
static string Sch_GroupRedefineNotFound
Definition SR.cs:806
static string Sch_SimpleTypeDoubleRedefine
Definition SR.cs:818
static string Sch_ComplexTypeRedefineNotFound
Definition SR.cs:814
static string Sch_SimpleTypeRedefineNotFound
Definition SR.cs:822
static string Sch_SimpleToComplexTypeRedefine
Definition SR.cs:816
static string Sch_ComplexToSimpleTypeRedefine
Definition SR.cs:820
static string Sch_GroupDoubleRedefine
Definition SR.cs:802
static string Sch_ComplexTypeDoubleRedefine
Definition SR.cs:812
static string Sch_AttrGroupDoubleRedefine
Definition SR.cs:808
Definition SR.cs:7
void SendValidationEvent(string code, XmlSchemaObject source)
void AddToTable(XmlSchemaObjectTable table, XmlQualifiedName qname, XmlSchemaObject item)
void PreprocessAttributeGroup(XmlSchemaAttributeGroup attributeGroup)
void SetParent(XmlSchemaObject child, XmlSchemaObject parent)
void CheckRefinedAttributeGroup(XmlSchemaAttributeGroup attributeGroup)
void PreprocessSimpleType(XmlSchemaSimpleType simpleType, bool local)
void PreprocessComplexType(XmlSchemaComplexType complexType, bool local)

References System.Xml.Schema.BaseProcessor.AddToTable(), System.Xml.Schema.XmlSchema.AttributeGroups, System.Xml.Schema.XmlSchemaRedefine.AttributeGroups, System.Xml.Schema.SchemaCollectionPreprocessor.CheckRefinedAttributeGroup(), System.Xml.Schema.SchemaCollectionPreprocessor.CheckRefinedComplexType(), System.Xml.Schema.SchemaCollectionPreprocessor.CheckRefinedGroup(), System.Xml.Schema.SchemaCollectionPreprocessor.CheckRefinedSimpleType(), System.Collections.CollectionBase.Count, System.Xml.Dictionary, System.Xml.Schema.XmlSchema.Groups, System.Xml.Schema.XmlSchemaRedefine.Groups, System.Xml.Schema.XmlSchemaRedefine.Items, System.Collections.DictionaryEntry.Key, System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessAttributeGroup(), System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessComplexType(), System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessGroup(), System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessSimpleType(), System.SR.Sch_AttrGroupDoubleRedefine, System.SR.Sch_AttrGroupRedefineNotFound, System.SR.Sch_ComplexToSimpleTypeRedefine, System.SR.Sch_ComplexTypeDoubleRedefine, System.SR.Sch_ComplexTypeRedefineNotFound, System.SR.Sch_GroupDoubleRedefine, System.SR.Sch_GroupRedefineNotFound, System.SR.Sch_SimpleToComplexTypeRedefine, System.SR.Sch_SimpleTypeDoubleRedefine, System.SR.Sch_SimpleTypeRedefineNotFound, System.Xml.Schema.XmlSchemaExternal.Schema, System.Xml.Schema.XmlSchema.SchemaTypes, System.Xml.Schema.XmlSchemaRedefine.SchemaTypes, System.Xml.Schema.BaseProcessor.SendValidationEvent(), System.Xml.Schema.SchemaCollectionPreprocessor.SetParent(), and System.Collections.DictionaryEntry.Value.

Referenced by System.Xml.Schema.SchemaCollectionPreprocessor.Preprocess().