Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IConfigurableObjectFactory.RegisterAlias Method

Given an object name, create an alias.

[Visual Basic]
Public Sub RegisterAlias( _
   ByVal name As String, _
   ByVal theAlias As String _
void RegisterAlias(
   string name,
   string theAlias


The name of the object.
The alias that will behave the same as the object name.


This is typically used to support names that are illegal within XML ids (which are used for object names).

Typically invoked during factory configuration, but can also be used for runtime registration of aliases. Therefore, a factory implementation should synchronize alias access.


Exception Type Condition
NoSuchObjectDefinitionException If there is no object with the given name.
ObjectsException If the alias is already in use.

See Also

IConfigurableObjectFactory Interface | Spring.Objects.Factory.Config Namespace