ConfigurationElement.OnDeserializeUnrecognizedElement(String, XmlReader) ConfigurationElement.OnDeserializeUnrecognizedElement(String, XmlReader) ConfigurationElement.OnDeserializeUnrecognizedElement(String, XmlReader) ConfigurationElement.OnDeserializeUnrecognizedElement(String, XmlReader) Method

定义

获取一个值,该值指示反序列化过程中是否遇到未知元素。Gets a value indicating whether an unknown element is encountered during deserialization.

protected:
 virtual bool OnDeserializeUnrecognizedElement(System::String ^ element, System::Xml::XmlReader ^ reader);
protected virtual bool OnDeserializeUnrecognizedElement (string element, System.Xml.XmlReader reader);
abstract member OnDeserializeUnrecognizedElement : string * System.Xml.XmlReader -> bool
override this.OnDeserializeUnrecognizedElement : string * System.Xml.XmlReader -> bool
Protected Overridable Function OnDeserializeUnrecognizedElement (element As String, reader As XmlReader) As Boolean

参数

elementName
String String String String

未知的子元素的名称。The name of the unknown subelement.

reader
XmlReader XmlReader XmlReader XmlReader

用于反序列化的 XmlReaderThe XmlReader being used for deserialization.

返回

如果反序列化过程中遇到未知元素,则为 true;否则为 falsetrue when an unknown element is encountered while deserializing; otherwise, false.

异常

通过 elementName 标识的元素被锁定。The element identified by elementName is locked.

-or- 元素的一个或多个特性被锁定。One or more of the element's attributes is locked.

- 或 --or- 无法识别 elementName,或者元素有无法识别的特性。elementName is unrecognized, or the element has an unrecognized attribute.

-or- 元素的某布尔值特性包含无效值。The element has a Boolean attribute with an invalid value.

- 或 --or- 多次尝试对属性进行反序列化。An attempt was made to deserialize a property more than once.

- 或 --or- 尝试对非元素有效成员的属性进行反序列化。An attempt was made to deserialize a property that is not a valid member of the element.

-or- 该元素不能包含 CDATA 或文本元素。The element cannot contain a CDATA or text element.

注解

反序列化对象时遇到未知属性时调用。 ConfigurationElement OnDeserializeUnrecognizedElementThe OnDeserializeUnrecognizedElement is invoked when an unknown attribute is encountered while deserializing the ConfigurationElement object.

适用于