Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ObjectDefinitionReaderUtils.RegisterObjectDefinition Method

Registers the supplied objectDefinition with the supplied registry.

[Visual Basic]
Public Shared Sub RegisterObjectDefinition( _
   ByVal objectDefinition As ObjectDefinitionHolder, _
   ByVal registry As IObjectDefinitionRegistry _
public static void RegisterObjectDefinition(
   ObjectDefinitionHolder objectDefinition,
   IObjectDefinitionRegistry registry


The object definition holder containing the IObjectDefinition that is to be registered.
The registry that the supplied objectDefinition is to be registered with.


This is a convenience method that registers the ObjectDefinition of the supplied objectDefinition under the ObjectName property value of said objectDefinition. If the supplied objectDefinition has any Aliases, then those aliases will also be registered with the supplied registry.


Exception Type Condition
ArgumentNullException If either of the supplied arguments is a null reference (Nothing in Visual Basic).
ObjectsException If the objectDefinition could not be registered with the registry.

See Also

ObjectDefinitionReaderUtils Class | Spring.Objects.Factory.Support Namespace