Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

TypeRegistry.RegisterType(String, String) Method

Registers an alias for the specified Type.

[Visual Basic]
Public Overloads Shared Sub RegisterType( _
   ByVal alias As String, _
   ByVal typeName As String _
)
[C#]
public static void RegisterType(
   string alias,
   string typeName
);

Parameters

alias
A string that will be used as an alias for the specified Type.
typeName
The (possibly partially assembly qualified) name of the Type to register the alias for.

Remarks

This overload does eager resolution of the Type referred to by the typeName parameter. It will throw a TypeLoadException if the Type referred to by the typeName parameter cannot be resolved.

Exceptions

Exception Type Condition
ArgumentNullException If either of the supplied parameters is a null reference (Nothing in Visual Basic) or contains only whitespace character(s).
TypeLoadException If the Type referred to by the supplied typeName cannot be loaded.

See Also

TypeRegistry Class | Spring.Core.TypeResolution Namespace | TypeRegistry.RegisterType Overload List