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

◆ AddNamespace()

void System.Xml.XmlTextReaderImpl.AddNamespace ( string prefix,
string uri,
NodeData attr )
inlineprivate

Definition at line 7049 of file XmlTextReaderImpl.cs.

7050 {
7051 if (uri == "http://www.w3.org/2000/xmlns/")
7052 {
7053 if (Ref.Equal(prefix, _xmlNs))
7054 {
7055 Throw(System.SR.Xml_XmlnsPrefix, attr.lineInfo2.lineNo, attr.lineInfo2.linePos);
7056 }
7057 else
7058 {
7059 Throw(System.SR.Xml_NamespaceDeclXmlXmlns, prefix, attr.lineInfo2.lineNo, attr.lineInfo2.linePos);
7060 }
7061 }
7062 else if (uri == "http://www.w3.org/XML/1998/namespace" && !Ref.Equal(prefix, _xml) && !_v1Compat)
7063 {
7064 Throw(System.SR.Xml_NamespaceDeclXmlXmlns, prefix, attr.lineInfo2.lineNo, attr.lineInfo2.linePos);
7065 }
7066 if (uri.Length == 0 && prefix.Length > 0)
7067 {
7068 Throw(System.SR.Xml_BadNamespaceDecl, attr.lineInfo.lineNo, attr.lineInfo.linePos);
7069 }
7070 try
7071 {
7073 }
7074 catch (ArgumentException e)
7075 {
7076 ReThrow(e, attr.lineInfo.lineNo, attr.lineInfo.linePos);
7077 }
7078 }
static string Xml_NamespaceDeclXmlXmlns
Definition SR.cs:308
static string Xml_BadNamespaceDecl
Definition SR.cs:134
static string Xml_XmlnsPrefix
Definition SR.cs:306
Definition SR.cs:7
virtual void AddNamespace(string prefix, string uri)
XmlNamespaceManager _namespaceManager
void ReThrow(Exception e, int lineNo, int linePos)
void Throw(int pos, string res, string arg)

References System.Xml.XmlTextReaderImpl._namespaceManager, System.Xml.XmlTextReaderImpl._v1Compat, System.Xml.XmlTextReaderImpl._xml, System.Xml.XmlTextReaderImpl._xmlNs, System.Xml.XmlNamespaceManager.AddNamespace(), System.Xml.Ref.Equal(), System.prefix, System.Xml.XmlTextReaderImpl.ReThrow(), System.Xml.XmlTextReaderImpl.Throw(), System.SR.Xml_BadNamespaceDecl, System.SR.Xml_NamespaceDeclXmlXmlns, and System.SR.Xml_XmlnsPrefix.

Referenced by System.Xml.XmlTextReaderImpl.OnDefaultNamespaceDecl(), and System.Xml.XmlTextReaderImpl.OnNamespaceDecl().