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

◆ ReadAttributes()

void System.Runtime.Serialization.Json.XmlJsonReader.ReadAttributes ( )
inlineprivate

Definition at line 897 of file XmlJsonReader.cs.

898 {
899 XmlAttributeNode xmlAttributeNode = AddAttribute();
900 xmlAttributeNode.LocalName.SetConstantValue(StringHandleConstStringType.Type);
901 xmlAttributeNode.Namespace.Uri.SetValue(0, 0);
902 xmlAttributeNode.Prefix.SetValue(PrefixHandleType.Empty);
904 byte @byte = base.BufferReader.GetByte();
905 switch (@byte)
906 {
907 case 34:
909 {
910 xmlAttributeNode.Value.SetConstantValue(ValueHandleConstStringType.String);
911 return;
912 }
913 xmlAttributeNode.Value.SetConstantValue(ValueHandleConstStringType.Object);
915 return;
916 case 110:
917 xmlAttributeNode.Value.SetConstantValue(ValueHandleConstStringType.Null);
918 return;
919 case 102:
920 case 116:
921 xmlAttributeNode.Value.SetConstantValue(ValueHandleConstStringType.Boolean);
922 return;
923 case 123:
924 xmlAttributeNode.Value.SetConstantValue(ValueHandleConstStringType.Object);
926 return;
927 case 125:
929 {
930 xmlAttributeNode.Value.SetConstantValue(ValueHandleConstStringType.Object);
931 }
932 else
933 {
935 }
936 return;
937 case 91:
938 xmlAttributeNode.Value.SetConstantValue(ValueHandleConstStringType.Array);
939 base.BufferReader.SkipByte();
940 EnterJsonScope(JsonNodeType.Collection);
941 return;
942 }
943 switch (@byte)
944 {
945 default:
946 if (@byte != 78 && @byte != 73)
947 {
949 break;
950 }
951 goto case 45;
952 case 45:
953 case 48:
954 case 49:
955 case 50:
956 case 51:
957 case 52:
958 case 53:
959 case 54:
960 case 55:
961 case 56:
962 case 57:
963 xmlAttributeNode.Value.SetConstantValue(ValueHandleConstStringType.Number);
964 break;
965 }
966 }
void EnterJsonScope(JsonNodeType currentNodeType)
void ReadServerTypeAttribute(bool consumedObjectChar)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string JsonEncounteredUnexpectedCharacter
Definition SR.cs:540
Definition SR.cs:7
XmlAttributeNode AddAttribute()
static void ThrowXmlException(XmlDictionaryReader reader, string res)

References System.Runtime.Serialization.Json.XmlJsonReader._expectingFirstElementInNonPrimitiveChild, System.Xml.XmlBaseReader.AddAttribute(), System.Runtime.Serialization.Dictionary, System.Runtime.Serialization.Json.XmlJsonReader.EnterJsonScope(), System.SR.Format(), System.SR.JsonEncounteredUnexpectedCharacter, System.Runtime.Serialization.Json.XmlJsonReader.ReadServerTypeAttribute(), System.Runtime.Serialization.Json.XmlJsonReader.SkipWhitespaceInBufferReader(), System.Xml.XmlExceptionHelper.ThrowXmlException(), and System.Xml.XmlException.

Referenced by System.Runtime.Serialization.Json.XmlJsonReader.ParseStartElement(), and System.Runtime.Serialization.Json.XmlJsonReader.ReadNonExistentElementName().