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 _
)
[C#]
void RegisterAlias(
   string name,
   string theAlias
);

Parameters

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

Remarks

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.

Exceptions

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