XmlReaderSettings.Async 属性

定义

获取或设置是否可对特定 XmlReader 实例使用异步 XmlReader 方法。Gets or sets whether asynchronous XmlReader methods can be used on a particular XmlReader 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 XmlReader 如果要 XmlReader 在该实例上使用异步方法,则在创建新实例时必须将此值设置为。You must set this value to true when you create a new XmlReader instance if you want to use asynchronous XmlReader methods on that instance. XmlReader创建实例后, Async 属性为只读。After the XmlReader instance is created, the Async property is read-only. 此属性的默认值为 falseThe default value of this property is false.

重载将忽略此标志 XmlReader.CreateThis flag is ignored by the XmlReader.Create overload. 这意味着,如果基于现有创建新 XmlReader XmlReader 的,则异步行为取决于输入 XmlReader ,不能使用 Async 标志来更改异步行为。This means that if you create a new XmlReader based on an existing XmlReader, the async behavior depends on the input XmlReader, and you cannot use the Async flag to change the async behavior.

适用于