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

◆ GetWhatWasFound()

static string System.Xml.XmlExceptionHelper.GetWhatWasFound ( XmlDictionaryReader reader)
inlinestaticprivate

Definition at line 59 of file XmlExceptionHelper.cs.

60 {
61 if (reader.EOF)
62 {
64 }
65 switch (reader.NodeType)
66 {
67 case XmlNodeType.Element:
68 return System.SR.Format(System.SR.XmlFoundElement, GetName(reader.Prefix, reader.LocalName), reader.NamespaceURI);
69 case XmlNodeType.EndElement:
70 return System.SR.Format(System.SR.XmlFoundEndElement, GetName(reader.Prefix, reader.LocalName), reader.NamespaceURI);
71 case XmlNodeType.Text:
72 case XmlNodeType.Whitespace:
73 case XmlNodeType.SignificantWhitespace:
74 return System.SR.Format(System.SR.XmlFoundText, reader.Value);
75 case XmlNodeType.Comment:
76 return System.SR.Format(System.SR.XmlFoundComment, reader.Value);
77 case XmlNodeType.CDATA:
78 return System.SR.Format(System.SR.XmlFoundCData, reader.Value);
79 default:
80 return System.SR.Format(System.SR.XmlFoundNodeType, reader.NodeType);
81 }
82 }
static string XmlFoundElement
Definition SR.cs:394
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlFoundText
Definition SR.cs:402
static string XmlFoundCData
Definition SR.cs:390
static string XmlFoundEndElement
Definition SR.cs:396
static string XmlFoundComment
Definition SR.cs:392
static string XmlFoundNodeType
Definition SR.cs:400
static string XmlFoundEndOfFile
Definition SR.cs:398
Definition SR.cs:7
static string GetName(string prefix, string localName)

References System.Xml.XmlReader.EOF, System.SR.Format(), System.Xml.XmlExceptionHelper.GetName(), System.Xml.XmlReader.LocalName, System.Xml.XmlReader.NamespaceURI, System.Xml.XmlReader.NodeType, System.Xml.XmlReader.Prefix, System.Xml.XmlReader.Value, System.SR.XmlFoundCData, System.SR.XmlFoundComment, System.SR.XmlFoundElement, System.SR.XmlFoundEndElement, System.SR.XmlFoundEndOfFile, System.SR.XmlFoundNodeType, and System.SR.XmlFoundText.

Referenced by System.Xml.XmlExceptionHelper.ThrowBase64DataExpected(), System.Xml.XmlExceptionHelper.ThrowEndElementExpected(), System.Xml.XmlExceptionHelper.ThrowFullStartElementExpected(), System.Xml.XmlExceptionHelper.ThrowFullStartElementExpected(), System.Xml.XmlExceptionHelper.ThrowFullStartElementExpected(), System.Xml.XmlExceptionHelper.ThrowStartElementExpected(), System.Xml.XmlExceptionHelper.ThrowStartElementExpected(), and System.Xml.XmlExceptionHelper.ThrowStartElementExpected().