XmlReader.Settings XmlReader.Settings XmlReader.Settings XmlReader.Settings Property


获取用于创建此 XmlReader 实例的 XmlReaderSettings 对象。Gets the XmlReaderSettings object used to create this XmlReader instance.

 virtual property System::Xml::XmlReaderSettings ^ Settings { System::Xml::XmlReaderSettings ^ get(); };
public virtual System.Xml.XmlReaderSettings Settings { get; }
member this.Settings : System.Xml.XmlReaderSettings
Public Overridable ReadOnly Property Settings As XmlReaderSettings


用于创建此读取器实例的 XmlReaderSettings 对象。The XmlReaderSettings object used to create this reader instance. 如果此读取器不是使用 Create 方法创建的,则此属性返回 nullIf this reader was not created using the Create method, this property returns null.


在上一次异步操作完成之前调用了 XmlReader 方法。An XmlReader 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."



XmlReaderSettings对象可以包含敏感信息,如用户凭据。The XmlReaderSettings object can contain sensitive information such as user credentials. 应用程序时一定要谨慎缓存此对象或将其传递到另一个组件。Applications must be careful when caching this object or passing it to another component.

XmlReaderSettings类用于指定要创建的读取器实例上支持的功能集。The XmlReaderSettings class is used to specify the set of features to support on the created reader instance. XmlReaderSettings不能修改此属性返回的对象。The XmlReaderSettings object returned by this property cannot be modified. 任何尝试更改单个设置导致引发异常。Any attempt to change individual settings results in an exception being thrown.