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

◆ StringToQName()

static XmlQualifiedName System.Xml.Schema.XmlBaseConverter.StringToQName ( string value,
IXmlNamespaceResolver nsResolver )
inlinestaticprotectedinherited

Definition at line 576 of file XmlBaseConverter.cs.

577 {
578 value = value.Trim();
579 string prefix;
580 string localName;
581 try
582 {
583 ValidateNames.ParseQNameThrow(value, out prefix, out localName);
584 }
585 catch (XmlException ex)
586 {
587 throw new FormatException(ex.Message);
588 }
589 if (nsResolver == null)
590 {
591 throw new InvalidCastException(System.SR.Format(System.SR.XmlConvert_TypeNoNamespace, value, prefix));
592 }
593 string text = nsResolver.LookupNamespace(prefix);
594 if (text == null)
595 {
596 throw new InvalidCastException(System.SR.Format(System.SR.XmlConvert_TypeNoNamespace, value, prefix));
597 }
598 return new XmlQualifiedName(localName, text);
599 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlConvert_TypeNoNamespace
Definition SR.cs:388
Definition SR.cs:7

References System.Xml.Dictionary, System.SR.Format(), System.Xml.ValidateNames.ParseQNameThrow(), System.prefix, System.text, System.value, and System.SR.XmlConvert_TypeNoNamespace.

Referenced by System.Xml.Schema.XmlMiscConverter.ChangeType(), System.Xml.Schema.XmlUntypedConverter.ChangeType(), System.Xml.Schema.XmlMiscConverter.ChangeType(), and System.Xml.Schema.XmlUntypedConverter.ChangeType().