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

◆ VerifyNMTOKEN() [2/2]

static string System.Xml.XmlConvert.VerifyNMTOKEN ( string name,
ExceptionType exceptionType )
inlinestaticpackage

Definition at line 394 of file XmlConvert.cs.

395 {
396 if (name == null)
397 {
398 throw new ArgumentNullException("name");
399 }
400 if (name.Length == 0)
401 {
403 }
404 int num = ValidateNames.ParseNmtokenNoNamespaces(name, 0);
405 if (num != name.Length)
406 {
407 throw CreateException(System.SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, num), exceptionType, 0, num + 1);
408 }
409 return name;
410 }
static string Xml_InvalidNmToken
Definition SR.cs:138
static string Xml_BadNameChar
Definition SR.cs:44
Definition SR.cs:7
static Exception CreateException(string res, ExceptionType exceptionType, int lineNo, int linePos)

References System.Xml.XmlException.BuildCharExceptionArgs(), System.Xml.XmlConvert.CreateException(), System.Xml.Dictionary, System.Text.RegularExpressions.name, System.Xml.ValidateNames.ParseNmtokenNoNamespaces(), System.SR.Xml_BadNameChar, and System.SR.Xml_InvalidNmToken.