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

◆ ThrowInvalidName()

static void System.Xml.ValidateNames.ThrowInvalidName ( string s,
int offsetStartChar,
int offsetBadChar )
inlinestaticpackage

Definition at line 207 of file ValidateNames.cs.

208 {
209 if (offsetStartChar >= s.Length)
210 {
211 throw new XmlException(System.SR.Format(System.SR.Xml_EmptyName, string.Empty));
212 }
213 if (XmlCharType.IsNCNameSingleChar(s[offsetBadChar]) && !XmlCharType.IsStartNCNameSingleChar(s[offsetBadChar]))
214 {
215 throw new XmlException(System.SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
216 }
217 throw new XmlException(System.SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
218 }
static string Xml_EmptyName
Definition SR.cs:292
static string Xml_BadStartNameChar
Definition SR.cs:42
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Xml_BadNameChar
Definition SR.cs:44
Definition SR.cs:7

References System.Xml.XmlException.BuildCharExceptionArgs(), System.Xml.Dictionary, System.SR.Format(), System.Xml.XmlCharType.IsNCNameSingleChar(), System.Xml.XmlCharType.IsStartNCNameSingleChar(), System.s, System.SR.Xml_BadNameChar, System.SR.Xml_BadStartNameChar, System.SR.Xml_EmptyName, and System.Xml.XmlException.

Referenced by System.Xml.ValidateNames.ParseNameTestThrow(), System.Xml.ValidateNames.ParseNCNameInternal(), and System.Xml.ValidateNames.ParseQNameThrow().