XmlWriter.WriteNodeAsync メソッド
定義
ソース オブジェクトから現在のライターのインスタンスにすべてを非同期にコピーします。Asynchronously copies everything from the source object to the current writer instance.
オーバーロード
WriteNodeAsync(XPathNavigator, Boolean) |
XPathNavigator オブジェクトのすべてをライターに非同期にコピーします。Asynchronously copies everything from the XPathNavigator object to the writer. XPathNavigator の位置は変更されません。The position of the XPathNavigator remains unchanged. |
WriteNodeAsync(XmlReader, Boolean) |
派生クラスでオーバーライドされると、リーダーのデータをすべてライターに非同期にコピーし、リーダーを次の兄弟の開始位置に移動します。Asynchronously copies everything from the reader to the writer and moves the reader to the start of the next sibling. |
注釈
これはの非同期バージョンで WriteNode あり、同じ機能を備えています。This is the asynchronous version of WriteNode, with the same functionality. このメソッドを使用するには、フラグをに設定する必要があり Async true
ます。To use this method, you must set the Async flag to true
.
WriteNodeAsync(XPathNavigator, Boolean)
XPathNavigator オブジェクトのすべてをライターに非同期にコピーします。Asynchronously copies everything from the XPathNavigator object to the writer. XPathNavigator の位置は変更されません。The position of the XPathNavigator remains unchanged.
public:
virtual System::Threading::Tasks::Task ^ WriteNodeAsync(System::Xml::XPath::XPathNavigator ^ navigator, bool defattr);
public virtual System.Threading.Tasks.Task WriteNodeAsync (System.Xml.XPath.XPathNavigator navigator, bool defattr);
abstract member WriteNodeAsync : System.Xml.XPath.XPathNavigator * bool -> System.Threading.Tasks.Task
override this.WriteNodeAsync : System.Xml.XPath.XPathNavigator * bool -> System.Threading.Tasks.Task
Public Overridable Function WriteNodeAsync (navigator As XPathNavigator, defattr As Boolean) As Task
パラメーター
- navigator
- XPathNavigator
コピー元の XPathNavigator。The XPathNavigator to copy from.
- defattr
- Boolean
既定の属性をコピーする場合は true
。それ以外の場合は false
。true
to copy the default attributes; otherwise, false
.
戻り値
非同期の WriteNode
操作を表すタスク。The task that represents the asynchronous WriteNode
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
. この場合、非同期メソッドを使用するには XmlWriterSettings.Async を true に設定する必要があることを示すメッセージと共に InvalidOperationException がスローされます。In this case, InvalidOperationException is thrown with the message "Set XmlWriterSettings.Async to true if you want to use Async Methods."
注釈
これはの非同期バージョンで WriteNode あり、同じ機能を備えています。This is the asynchronous version of WriteNode, with the same functionality. このメソッドを使用するには、フラグをに設定する必要があり Async true
ます。To use this method, you must set the Async flag to true
.
こちらもご覧ください
- 非同期プログラミング (C#)Asynchronous programming (C#)
- Async および Await を使用した非同期プログラミング (Visual Basic)Asynchronous programming with Async and Await (Visual Basic)
適用対象
WriteNodeAsync(XmlReader, Boolean)
派生クラスでオーバーライドされると、リーダーのデータをすべてライターに非同期にコピーし、リーダーを次の兄弟の開始位置に移動します。Asynchronously copies everything from the reader to the writer and moves the reader to the start of the next sibling.
public:
virtual System::Threading::Tasks::Task ^ WriteNodeAsync(System::Xml::XmlReader ^ reader, bool defattr);
public virtual System.Threading.Tasks.Task WriteNodeAsync (System.Xml.XmlReader reader, bool defattr);
abstract member WriteNodeAsync : System.Xml.XmlReader * bool -> System.Threading.Tasks.Task
override this.WriteNodeAsync : System.Xml.XmlReader * bool -> System.Threading.Tasks.Task
Public Overridable Function WriteNodeAsync (reader As XmlReader, defattr As Boolean) As Task
パラメーター
- defattr
- Boolean
XmlReader
の既定の属性をコピーする場合は true
。それ以外の場合は false
。true
to copy the default attributes from the XmlReader
; otherwise, false
.
戻り値
非同期の WriteNode
操作を表すタスク。The task that represents the asynchronous WriteNode
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
. この場合、非同期メソッドを使用するには XmlWriterSettings.Async を true に設定する必要があることを示すメッセージと共に InvalidOperationException がスローされます。In this case, InvalidOperationException is thrown with the message "Set XmlWriterSettings.Async to true if you want to use Async Methods."
注釈
これはの非同期バージョンで WriteNode あり、同じ機能を備えています。This is the asynchronous version of WriteNode, with the same functionality. このメソッドを使用するには、フラグをに設定する必要があり Async true
ます。To use this method, you must set the Async flag to true
.
こちらもご覧ください
- 非同期プログラミング (C#)Asynchronous programming (C#)
- Async および Await を使用した非同期プログラミング (Visual Basic)Asynchronous programming with Async and Await (Visual Basic)