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

屬性值

如果可以使用非同步方法,則為 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. 建立實例之後, 屬性會是Async唯讀的。 XmlWriterAfter the XmlWriter instance is created, the Async property is read-only. 此屬性的預設值為 falseThe default value of this property is false.

多載會忽略XmlWriter.Create此旗標。This 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.

適用於

另請參閱