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

◆ QNameToString() [2/2]

static string System.Xml.Schema.XmlBaseConverter.QNameToString ( XmlQualifiedName qname,
IXmlNamespaceResolver nsResolver )
inlinestaticprotectedinherited

Definition at line 706 of file XmlBaseConverter.cs.

707 {
708 if (nsResolver == null)
709 {
710 return "{" + qname.Namespace + "}" + qname.Name;
711 }
712 string text = nsResolver.LookupPrefix(qname.Namespace);
713 if (text == null)
714 {
715 throw new InvalidCastException(System.SR.Format(System.SR.XmlConvert_TypeNoPrefix, qname, qname.Namespace));
716 }
717 if (text.Length == 0)
718 {
719 return qname.Name;
720 }
721 return text + ":" + qname.Name;
722 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlConvert_TypeNoPrefix
Definition SR.cs:386
Definition SR.cs:7

References System.Xml.Dictionary, System.SR.Format(), System.Xml.XmlQualifiedName.Name, System.Xml.XmlQualifiedName.Namespace, System.text, and System.SR.XmlConvert_TypeNoPrefix.