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

◆ XDR_BeginElementType()

static void System.Xml.Schema.XdrBuilder.XDR_BeginElementType ( XdrBuilder builder)
inlinestaticprivate

Definition at line 687 of file XdrBuilder.cs.

688 {
689 string text = null;
690 string msg = null;
691 if (builder._ElementDef._ElementDecl.Name.IsEmpty)
692 {
694 msg = "name";
695 }
696 else
697 {
698 if (builder._ElementDef._HasDataType)
699 {
700 if (!builder._ElementDef._AllowDataType)
701 {
703 goto IL_01f4;
704 }
706 }
707 else if (builder._ElementDef._ContentAttr == 0)
708 {
709 switch (builder._ElementDef._OrderAttr)
710 {
711 case 0:
714 break;
715 case 2:
717 break;
718 case 3:
720 break;
721 case 1:
723 break;
724 }
725 }
726 bool isOpen = builder._contentValidator.IsOpen;
727 ElementContent elementDef = builder._ElementDef;
728 switch (builder._ElementDef._ContentAttr)
729 {
730 case 2:
731 builder._ElementDef._ElementDecl.ContentValidator = ContentValidator.TextOnly;
734 goto default;
735 case 4:
736 builder._contentValidator = new ParticleContentValidator(XmlSchemaContentType.ElementOnly);
737 if (elementDef._OrderAttr == 0)
738 {
740 }
743 goto default;
744 case 1:
747 goto default;
748 case 3:
749 if (elementDef._OrderAttr == 0 || elementDef._OrderAttr == 1)
750 {
754 goto default;
755 }
757 break;
758 default:
759 if (elementDef._ContentAttr == 3 || elementDef._ContentAttr == 4)
760 {
761 builder._contentValidator.Start();
762 builder._contentValidator.OpenGroup();
763 }
764 break;
765 }
766 }
767 goto IL_01f4;
768 IL_01f4:
769 if (text != null)
770 {
771 builder.SendValidationEvent(text, msg);
772 }
773 }
static string Sch_MissAttribute
Definition SR.cs:428
static string Sch_MixedMany
Definition SR.cs:444
static string Sch_DataTypeTextOnly
Definition SR.cs:432
Definition SR.cs:7

References System.Xml.Dictionary, System.Xml.Schema.ContentValidator.Empty, System.SR.Sch_DataTypeTextOnly, System.SR.Sch_MissAttribute, System.SR.Sch_MixedMany, System.text, and System.Xml.Schema.ContentValidator.TextOnly.