static private VerifyQName ( string name, ExceptionType exceptionType ) : string | ||
name | string | |
exceptionType | ExceptionType | |
return | string |
internal static unsafe string VerifyQName(string name, ExceptionType exceptionType)
{
if (name == null || name.Length == 0)
{
throw new ArgumentNullException(nameof(name));
}
int colonPosition = -1;
int endPos = ValidateNames.ParseQName(name, 0, out colonPosition);
if (endPos != name.Length)
{
throw CreateException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos), exceptionType, 0, endPos + 1);
}
return name;
}
XmlConvert::VerifyQName ( string name ) : string |
public override Task WriteNameAsync(string name) { if (_checkNames) { XmlConvert.VerifyQName(name, ExceptionType.XmlException); } return(writer.WriteNameAsync(name)); }