XProcessingInstruction.WriteToAsync(XmlWriter, CancellationToken) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将此 XProcessingInstruction 写入指定的 XmlWriter。
public:
override System::Threading::Tasks::Task ^ WriteToAsync(System::Xml::XmlWriter ^ writer, System::Threading::CancellationToken cancellationToken);
public override System.Threading.Tasks.Task WriteToAsync(System.Xml.XmlWriter writer, System.Threading.CancellationToken cancellationToken);
override this.WriteToAsync : System.Xml.XmlWriter * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function WriteToAsync (writer As XmlWriter, cancellationToken As CancellationToken) As Task
参数
- writer
- XmlWriter
要写入到的 XProcessingInstruction 编写器。
- cancellationToken
- CancellationToken
可用于请求取消异步操作的令牌。
返回
表示异步写入操作的任务。
例外
取消令牌已取消。 此异常存储在返回的任务中。
注解
此方法存储在任务中,它返回该方法的同步对应项可以引发的所有非使用异常。 如果异常存储在返回的任务中,则等待任务时将引发该异常。 使用情况异常(例如 ArgumentException)仍会同步引发。 有关存储的异常,请参阅由 WriteTo(XmlWriter)..