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.

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".

See Also

RegisterElementCollection Class

Microsoft.Practices.Unity.Configuration Namespace