Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

NamespaceParserSupport.Decorate Method

Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, returning the decorated definition.

[Visual Basic]
Public NotOverridable Sub Decorate( _
   ByVal node As XmlNode, _
   ByVal definition As ObjectDefinitionHolder, _
   ByVal parserContext As ParserContext _
) _
    Implements INamespaceParser.Decorate
public ObjectDefinitionHolder Decorate(
   XmlNode node,
   ObjectDefinitionHolder definition,
   ParserContext parserContext


The source element or attribute that is to be parsed.
The current object definition.
The object encapsulating the current state of the parsing process.

Return Value

The decorated definition (to be registered in the IApplicationContext/IObjectFactory), or simply the original object definition if no decoration is required. A null value is strickly speaking invalid, but will leniently treated like the case where the original object definition gets returned.




The XmlNode may either be an XmlAttribute or an XmlElement, depending on whether a custom attribute or element is being parsed.

Implementations may choose to return a completely new definition, which will replace the original definition in the resulting IApplicationContext/IObjectFactory.

The supplied ParserContext can be used to register any additional objects needed to support the main definition.

See Also

NamespaceParserSupport Class | Spring.Objects.Factory.Xml Namespace