public override void WriteProcessingInstruction(string name, string text)
{
if (IsClosed)
{
ThrowClosed();
}
if (!name.Equals("xml", StringComparison.OrdinalIgnoreCase))
{
throw new ArgumentException(SR.JsonXmlProcessingInstructionNotSupported, nameof(name));
}
if (WriteState != WriteState.Start)
{
throw new XmlException(SR.JsonXmlInvalidDeclaration);
}
}