Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

INamespaceParser.Decorate Method

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

[Visual Basic]
Public Sub Decorate( _
   ByVal node As XmlNode, _
   ByVal definition As ObjectDefinitionHolder, _
   ByVal parserContext As ParserContext _
)
[C#]
ObjectDefinitionHolder Decorate(
   XmlNode node,
   ObjectDefinitionHolder definition,
   ParserContext parserContext
);

Parameters

node
The source element or attribute that is to be parsed.
definition
The current object definition.
parserContext
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.

Remarks

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

INamespaceParser Interface | Spring.Objects.Factory.Xml Namespace