public override Task WriteDocTypeAsync(string name, string pubid, string sysid, string subset)
{
if (_checkNames)
{
ValidateQName(name);
}
if (_checkValues)
{
if (pubid != null)
{
int i;
if ((i = _xmlCharType.IsPublicId(pubid)) >= 0)
{
throw XmlConvert.CreateInvalidCharException(pubid, i);
}
}
if (sysid != null)
{
CheckCharacters(sysid);
}
if (subset != null)
{
CheckCharacters(subset);
}
}
if (_replaceNewLines)
{
sysid = ReplaceNewLines(sysid);
pubid = ReplaceNewLines(pubid);
subset = ReplaceNewLines(subset);
}
return(writer.WriteDocTypeAsync(name, pubid, sysid, subset));
}