RegisterElementCollection.OnDeserializeUnrecognizedElement Method
Causes the configuration system to throw an exception.
Namespace: Microsoft.Practices.Unity.Configuration
Assembly: Microsoft.Practices.Unity.Configuration (in Microsoft.Practices.Unity.Configuration.dll)
Syntax
'Declaration
Protected Overrides Function OnDeserializeUnrecognizedElement ( _
elementName As String, _
reader As XmlReader _
) As Boolean
protected override bool OnDeserializeUnrecognizedElement(
string elementName,
XmlReader reader
)
protected:
virtual bool OnDeserializeUnrecognizedElement(
String^ elementName,
XmlReader^ reader
) override
protected override function OnDeserializeUnrecognizedElement(
elementName : String,
reader : XmlReader
) : boolean
Parameters
- elementName
Type: System.String
The name of the unrecognized element.
- reader
Type: System.Xml.XmlReader
An input stream that reads XML from the configuration file.
Return Value
true if the unrecognized element was deserialized successfully; otherwise, false. The default is false.
Exceptions
Exception | Condition |
---|---|
System.Configuration.ConfigurationErrorsException | The element specified in elementName is the <clear> element. |
System.ArgumentException | elementName starts with the reserved prefix "config" or "lock". |