Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AbstractObjectDefinitionParser.ResolveId Method

Resolves the ID for the supplied IObjectDefinition.

[Visual Basic]
Protected Overridable Sub ResolveId( _
   ByVal element As XmlElement, _
   ByVal definition As AbstractObjectDefinition, _
   ByVal parserContext As ParserContext _
)
[C#]
protected virtual string ResolveId(
   XmlElement element,
   AbstractObjectDefinition definition,
   ParserContext parserContext
);

Parameters

element
The element that the object definition has been built from.
definition
The object definition to be registered.
parserContext
The the object encapsulating the current state of the parsing process; provides access to a IObjectDefinitionRegistry

Return Value

the resolved id

Remarks

When using ShouldGenerateId generation, a name is generated automatically. Otherwise, the ID is extracted from the "id" attribute, potentially with a ShouldGenerateIdAsFallback fallback to a generated id.

Exceptions

Exception Type Condition
ObjectDefinitionStoreException if no unique name could be generated for the given object definition

See Also

AbstractObjectDefinitionParser Class | Spring.Objects.Factory.Xml Namespace