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 _
)
[C#]
public static void RegisterObjectDefinition(
   ObjectDefinitionHolder objectDefinition,
   IObjectDefinitionRegistry registry
);

Parameters

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

Remarks

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.

Exceptions

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