Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ResourceHandlerRegistry.RegisterResourceHandler(String, Type) Method

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

[Visual Basic]
Public Overloads Shared Sub RegisterResourceHandler( _
   ByVal protocolName As String, _
   ByVal handlerType As Type _
)
[C#]
public static void RegisterResourceHandler(
   string protocolName,
   Type handlerType
);

Parameters

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

Remarks

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

Exceptions

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 handlerType is a null reference (Nothing in Visual Basic).
ArgumentException If the supplied handlerType is not a Type that derives from the IResource interface; or (having passed this first check), the supplied handlerType does not expose a constructor that takes a single String parameter.

See Also

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