Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ResourceHandlerRegistry.RegisterResourceHandler(String, String) Method

Registers resource handler and maps it to the specified protocol name.

[Visual Basic]
Public Overloads Shared Sub RegisterResourceHandler( _
   ByVal protocolName As String, _
   ByVal handlerTypeName As String _
public static void RegisterResourceHandler(
   string protocolName,
   string handlerTypeName


The protocol to add (or override).
The type name of the concrete implementation of the IResource interface that will handle the specified protocol.


If the mapping already exists, the existing mapping will be silently overwritten with the new mapping.


Exception Type Condition
ArgumentNullException If the supplied protocolName is a null reference (Nothing in Visual Basic) or contains only whitespace character(s); or if the supplied handlerTypeName is a null reference (Nothing in Visual Basic).
ArgumentException If the supplied handlerTypeName is not a Type that derives from the IResource interface; or (having passed this first check), the supplied handlerTypeName does not expose a constructor that takes a single String parameter.

See Also

ResourceHandlerRegistry Class | Spring.Core.IO Namespace | ResourceHandlerRegistry.RegisterResourceHandler Overload List