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

◆ ReadAttributes2()

void System.Xml.XmlBinaryReader.ReadAttributes2 ( )
inlineprivate

Definition at line 816 of file XmlBinaryReader.cs.

817 {
818 int num = 0;
819 if (_buffered)
820 {
821 num = base.BufferReader.Offset;
822 }
823 while (true)
824 {
825 XmlBinaryNodeType nodeType = GetNodeType();
826 switch (nodeType)
827 {
828 case XmlBinaryNodeType.MinAttribute:
829 {
830 SkipNodeType();
831 XmlAttributeNode xmlAttributeNode = AddAttribute();
832 xmlAttributeNode.Prefix.SetValue(PrefixHandleType.Empty);
833 ReadName(xmlAttributeNode.LocalName);
834 ReadAttributeText(xmlAttributeNode.AttributeText);
835 break;
836 }
837 case XmlBinaryNodeType.Attribute:
838 {
839 SkipNodeType();
840 XmlAttributeNode xmlAttributeNode = AddAttribute();
842 ReadName(xmlAttributeNode.LocalName);
843 ReadAttributeText(xmlAttributeNode.AttributeText);
845 break;
846 }
847 case XmlBinaryNodeType.ShortDictionaryAttribute:
848 {
849 SkipNodeType();
850 XmlAttributeNode xmlAttributeNode = AddAttribute();
851 xmlAttributeNode.Prefix.SetValue(PrefixHandleType.Empty);
853 ReadAttributeText(xmlAttributeNode.AttributeText);
854 break;
855 }
856 case XmlBinaryNodeType.DictionaryAttribute:
857 {
858 SkipNodeType();
859 XmlAttributeNode xmlAttributeNode = AddAttribute();
862 ReadAttributeText(xmlAttributeNode.AttributeText);
863 break;
864 }
865 case XmlBinaryNodeType.XmlnsAttribute:
866 {
867 SkipNodeType();
868 Namespace @namespace = AddNamespace();
869 ReadName(@namespace.Prefix);
870 ReadName(@namespace.Uri);
871 XmlAttributeNode xmlAttributeNode = AddXmlnsAttribute(@namespace);
872 break;
873 }
874 case XmlBinaryNodeType.ShortXmlnsAttribute:
875 {
876 SkipNodeType();
877 Namespace @namespace = AddNamespace();
878 @namespace.Prefix.SetValue(PrefixHandleType.Empty);
879 ReadName(@namespace.Uri);
880 XmlAttributeNode xmlAttributeNode = AddXmlnsAttribute(@namespace);
881 break;
882 }
883 case XmlBinaryNodeType.ShortDictionaryXmlnsAttribute:
884 {
885 SkipNodeType();
886 Namespace @namespace = AddNamespace();
887 @namespace.Prefix.SetValue(PrefixHandleType.Empty);
888 ReadDictionaryName(@namespace.Uri);
889 XmlAttributeNode xmlAttributeNode = AddXmlnsAttribute(@namespace);
890 break;
891 }
892 case XmlBinaryNodeType.DictionaryXmlnsAttribute:
893 {
894 SkipNodeType();
895 Namespace @namespace = AddNamespace();
896 ReadName(@namespace.Prefix);
897 ReadDictionaryName(@namespace.Uri);
898 XmlAttributeNode xmlAttributeNode = AddXmlnsAttribute(@namespace);
899 break;
900 }
901 case XmlBinaryNodeType.PrefixDictionaryAttributeA:
902 case XmlBinaryNodeType.PrefixDictionaryAttributeB:
903 case XmlBinaryNodeType.PrefixDictionaryAttributeC:
904 case XmlBinaryNodeType.PrefixDictionaryAttributeD:
905 case XmlBinaryNodeType.PrefixDictionaryAttributeE:
906 case XmlBinaryNodeType.PrefixDictionaryAttributeF:
907 case XmlBinaryNodeType.PrefixDictionaryAttributeG:
908 case XmlBinaryNodeType.PrefixDictionaryAttributeH:
909 case XmlBinaryNodeType.PrefixDictionaryAttributeI:
910 case XmlBinaryNodeType.PrefixDictionaryAttributeJ:
911 case XmlBinaryNodeType.PrefixDictionaryAttributeK:
912 case XmlBinaryNodeType.PrefixDictionaryAttributeL:
913 case XmlBinaryNodeType.PrefixDictionaryAttributeM:
914 case XmlBinaryNodeType.PrefixDictionaryAttributeN:
915 case XmlBinaryNodeType.PrefixDictionaryAttributeO:
916 case XmlBinaryNodeType.PrefixDictionaryAttributeP:
917 case XmlBinaryNodeType.PrefixDictionaryAttributeQ:
918 case XmlBinaryNodeType.PrefixDictionaryAttributeR:
919 case XmlBinaryNodeType.PrefixDictionaryAttributeS:
920 case XmlBinaryNodeType.PrefixDictionaryAttributeT:
921 case XmlBinaryNodeType.PrefixDictionaryAttributeU:
922 case XmlBinaryNodeType.PrefixDictionaryAttributeV:
923 case XmlBinaryNodeType.PrefixDictionaryAttributeW:
924 case XmlBinaryNodeType.PrefixDictionaryAttributeX:
925 case XmlBinaryNodeType.PrefixDictionaryAttributeY:
926 case XmlBinaryNodeType.PrefixDictionaryAttributeZ:
927 {
928 SkipNodeType();
929 XmlAttributeNode xmlAttributeNode = AddAttribute();
930 PrefixHandleType alphaPrefix = PrefixHandle.GetAlphaPrefix((int)(nodeType - 12));
931 xmlAttributeNode.Prefix.SetValue(alphaPrefix);
933 ReadAttributeText(xmlAttributeNode.AttributeText);
934 break;
935 }
936 case XmlBinaryNodeType.PrefixAttributeA:
937 case XmlBinaryNodeType.PrefixAttributeB:
938 case XmlBinaryNodeType.PrefixAttributeC:
939 case XmlBinaryNodeType.PrefixAttributeD:
940 case XmlBinaryNodeType.PrefixAttributeE:
941 case XmlBinaryNodeType.PrefixAttributeF:
942 case XmlBinaryNodeType.PrefixAttributeG:
943 case XmlBinaryNodeType.PrefixAttributeH:
944 case XmlBinaryNodeType.PrefixAttributeI:
945 case XmlBinaryNodeType.PrefixAttributeJ:
946 case XmlBinaryNodeType.PrefixAttributeK:
947 case XmlBinaryNodeType.PrefixAttributeL:
948 case XmlBinaryNodeType.PrefixAttributeM:
949 case XmlBinaryNodeType.PrefixAttributeN:
950 case XmlBinaryNodeType.PrefixAttributeO:
951 case XmlBinaryNodeType.PrefixAttributeP:
952 case XmlBinaryNodeType.PrefixAttributeQ:
953 case XmlBinaryNodeType.PrefixAttributeR:
954 case XmlBinaryNodeType.PrefixAttributeS:
955 case XmlBinaryNodeType.PrefixAttributeT:
956 case XmlBinaryNodeType.PrefixAttributeU:
957 case XmlBinaryNodeType.PrefixAttributeV:
958 case XmlBinaryNodeType.PrefixAttributeW:
959 case XmlBinaryNodeType.PrefixAttributeX:
960 case XmlBinaryNodeType.PrefixAttributeY:
961 case XmlBinaryNodeType.PrefixAttributeZ:
962 {
963 SkipNodeType();
964 XmlAttributeNode xmlAttributeNode = AddAttribute();
965 PrefixHandleType alphaPrefix = PrefixHandle.GetAlphaPrefix((int)(nodeType - 38));
966 xmlAttributeNode.Prefix.SetValue(alphaPrefix);
967 ReadName(xmlAttributeNode.LocalName);
968 ReadAttributeText(xmlAttributeNode.AttributeText);
969 break;
970 }
971 default:
973 return;
974 }
975 }
976 }
void SetValue(PrefixHandleType type)
void FixXmlAttribute(XmlAttributeNode attributeNode)
XmlAttributeNode AddXmlnsAttribute(Namespace ns)
XmlAttributeNode AddAttribute()
void ReadAttributeText(XmlAttributeTextNode textNode)
void ReadName(ValueHandle value)
void ReadDictionaryName(StringHandle s)
XmlBinaryNodeType GetNodeType()

References System.Xml.XmlBinaryReader._buffered, System.Xml.XmlBaseReader.AddAttribute(), System.Xml.XmlBaseReader.AddNamespace(), System.Xml.XmlBaseReader.AddXmlnsAttribute(), System.Xml.Dictionary, System.Xml.XmlBaseReader.FixXmlAttribute(), System.Xml.PrefixHandle.GetAlphaPrefix(), System.Xml.XmlBinaryReader.GetNodeType(), System.Xml.XmlBaseReader.Namespace.Prefix, System.Xml.XmlBaseReader.Prefix, System.Xml.XmlBaseReader.ProcessAttributes(), System.Xml.XmlBinaryReader.ReadAttributeText(), System.Xml.XmlBinaryReader.ReadDictionaryName(), System.Xml.XmlBinaryReader.ReadName(), System.Xml.PrefixHandle.SetValue(), and System.Xml.XmlBinaryReader.SkipNodeType().

Referenced by System.Xml.XmlBinaryReader.ReadAttributes().