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

◆ GetInvalidNameException()

static Exception System.Xml.ValidateNames.GetInvalidNameException ( string s,
int offsetStartChar,
int offsetBadChar )
inlinestaticpackage

Definition at line 220 of file ValidateNames.cs.

221 {
222 if (offsetStartChar >= s.Length)
223 {
224 return new XmlException(System.SR.Xml_EmptyName, string.Empty);
225 }
226 if (XmlCharType.IsNCNameSingleChar(s[offsetBadChar]) && !XmlCharType.IsStartNCNameSingleChar(s[offsetBadChar]))
227 {
228 return new XmlException(System.SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
229 }
230 return new XmlException(System.SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
231 }
static string Xml_EmptyName
Definition SR.cs:292
static string Xml_BadStartNameChar
Definition SR.cs:42
static string Xml_BadNameChar
Definition SR.cs:44
Definition SR.cs:7

References System.Xml.XmlException.BuildCharExceptionArgs(), System.Xml.Dictionary, 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.XmlConvert.TryVerifyNCName().