XmlWriter.WriteRawAsync XmlWriter.WriteRawAsync XmlWriter.WriteRawAsync XmlWriter.WriteRawAsync Method

定義

以非同步的方式手動寫入未經處理的標記 (Raw Markup)。Asynchronously writes raw markup manually.

多載

WriteRawAsync(String) WriteRawAsync(String) WriteRawAsync(String) WriteRawAsync(String)

以非同步的方式從字串手動寫入未經處理的標記 (Raw Markup)。Asynchronously writes raw markup manually from a string.

WriteRawAsync(Char[], Int32, Int32) WriteRawAsync(Char[], Int32, Int32) WriteRawAsync(Char[], Int32, Int32) WriteRawAsync(Char[], Int32, Int32)

以非同步的方式從字元緩衝區手動寫入未經處理的標記。Asynchronously writes raw markup manually from a character buffer.

備註

這是非同步的WriteRaw,使用相同的功能。This is the asynchronous version of WriteRaw, with the same functionality. 若要使用此方法,您必須設定Async旗標設為trueTo use this method, you must set the Async flag to true.

WriteRawAsync(String) WriteRawAsync(String) WriteRawAsync(String) WriteRawAsync(String)

以非同步的方式從字串手動寫入未經處理的標記 (Raw Markup)。Asynchronously writes raw markup manually from a string.

public:
 virtual System::Threading::Tasks::Task ^ WriteRawAsync(System::String ^ data);
public virtual System.Threading.Tasks.Task WriteRawAsync (string data);
abstract member WriteRawAsync : string -> System.Threading.Tasks.Task
override this.WriteRawAsync : string -> System.Threading.Tasks.Task
Public Overridable Function WriteRawAsync (data As String) As Task

參數

data
String String String String

包含要寫入之文字的字串。String containing the text to write.

傳回

表示非同步 WriteRaw 作業的工作。The task that represents the asynchronous WriteRaw operation.

例外狀況

在先前的非同步作業完成前呼叫了 XmlWriter 方法。An XmlWriter method was called before a previous asynchronous operation finished. 在此情況下,會擲回 InvalidOperationException 與「非同步作業已經在進行中」的訊息。In this case, InvalidOperationException is thrown with the message "An asynchronous operation is already in progress."

-或--or-

在未將 Async 旗標設為 true的情況下呼叫了 XmlWriter 非同步方法。An XmlWriter asynchronous method was called without setting the Async flag to true. 在此情況下,就會擲回 InvalidOperationException 並顯示訊息「如果您要使用非同步方法,請將 XmlWriterSettings.Async 設為 true」。In this case, InvalidOperationException is thrown with the message "Set XmlWriterSettings.Async to true if you want to use Async Methods."

備註

這是非同步的WriteRaw,使用相同的功能。This is the asynchronous version of WriteRaw, with the same functionality. 若要使用此方法,您必須設定Async旗標設為trueTo use this method, you must set the Async flag to true.

另請參閱

WriteRawAsync(Char[], Int32, Int32) WriteRawAsync(Char[], Int32, Int32) WriteRawAsync(Char[], Int32, Int32) WriteRawAsync(Char[], Int32, Int32)

以非同步的方式從字元緩衝區手動寫入未經處理的標記。Asynchronously writes raw markup manually from a character buffer.

public:
 virtual System::Threading::Tasks::Task ^ WriteRawAsync(cli::array <char> ^ buffer, int index, int count);
public virtual System.Threading.Tasks.Task WriteRawAsync (char[] buffer, int index, int count);
abstract member WriteRawAsync : char[] * int * int -> System.Threading.Tasks.Task
override this.WriteRawAsync : char[] * int * int -> System.Threading.Tasks.Task
Public Overridable Function WriteRawAsync (buffer As Char(), index As Integer, count As Integer) As Task

參數

buffer
Char[]

包含要寫入之文字的字元陣列。Character array containing the text to write.

index
Int32 Int32 Int32 Int32

緩衝區中指示要寫入的文字開頭的位置。The position within the buffer indicating the start of the text to write.

count
Int32 Int32 Int32 Int32

要寫入的字元數。The number of characters to write.

傳回

表示非同步 WriteRaw 作業的工作。The task that represents the asynchronous WriteRaw operation.

例外狀況

在先前的非同步作業完成前呼叫了 XmlWriter 方法。An XmlWriter method was called before a previous asynchronous operation finished. 在此情況下,會擲回 InvalidOperationException 與「非同步作業已經在進行中」的訊息。In this case, InvalidOperationException is thrown with the message "An asynchronous operation is already in progress."

-或--or-

在未將 Async 旗標設為 true的情況下呼叫了 XmlWriter 非同步方法。An XmlWriter asynchronous method was called without setting the Async flag to true. 在此情況下,就會擲回 InvalidOperationException 並顯示訊息「如果您要使用非同步方法,請將 XmlWriterSettings.Async 設為 true」。In this case, InvalidOperationException is thrown with the message "Set XmlWriterSettings.Async to true if you want to use Async Methods."

備註

這是非同步的WriteRaw,使用相同的功能。This is the asynchronous version of WriteRaw, with the same functionality. 若要使用此方法,您必須設定Async旗標設為trueTo use this method, you must set the Async flag to true.

另請參閱

適用於