XmlWriterSettings.Async 屬性

定義

取得或設定值,指出非同步 XmlWriter 方法是否可以用於特定 XmlWriter 執行個體。Gets or sets a value that indicates whether asynchronous XmlWriter methods can be used on a particular XmlWriter instance.

public:
 property bool Async { bool get(); void set(bool value); };
public bool Async { get; set; }
member this.Async : bool with get, set
Public Property Async As Boolean

屬性值

Boolean

如果可以使用非同步方法,則為 true,否則為falsetrue if asynchronous methods can be used; otherwise, false.

備註

true XmlWriter 如果您想要 XmlWriter 在該實例上使用非同步方法,則在建立新的實例時,您必須將此值設定為。You must set this value to true when you create a new XmlWriter instance if you want to use asynchronous XmlWriter methods on that instance. XmlWriter建立實例之後, Async 屬性會是唯讀的。After the XmlWriter instance is created, the Async property is read-only. 此屬性的預設值為 falseThe default value of this property is false.

多載會忽略此旗標 XmlWriter.CreateThis flag is ignored by the XmlWriter.Create overload. 這表示,如果您根據現有的來建立新的 XmlWriter XmlWriter ,則非同步行為取決於輸入 XmlWriter ,您無法使用 Async 旗標來變更非同步行為。This means that if you create a new XmlWriter based on an existing XmlWriter, the async behavior depends on the input XmlWriter, and you cannot use the Async flag to change the async behavior.

適用於