ResourceHandlersSectionHandler Class
Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ResourceHandlersSectionHandler Class

Handler for Spring.NET resourceHandlers config section.

For a list of all members of this type, see ResourceHandlersSectionHandler Members .


[Visual Basic]
Public Class ResourceHandlersSectionHandler
    Implements IConfigurationSectionHandler
public class ResourceHandlersSectionHandler : IConfigurationSectionHandler

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


Spring allows registration of custom resource handlers that can be used to load object definitions from.

For example, if you wanted to store your object definitions in a database instead of in the config file, you could write a custom IResource implementation and register it with Spring using 'db' as a protocol name.

Afterwards, you would simply specify resource URI within the context config element using your custom resource handler.


The following example shows how to configure both this section handler, how to define custom resource within Spring config section, and how to load object definitions using custom resource handler:

      <sectionGroup name="spring">
        <section name="resourceHandlers" type="Spring.Context.Support.ResourceHandlersSectionHandler, Spring.Core" />
        <handler protocol="db" type="MyCompany.MyApp.Resources.MyDbResource, MyAssembly" />
        <resource uri="db://user:pass@dbName/MyDefinitionsTable" />


Namespace: Spring.Context.Support

Assembly: Spring.Core (in Spring.Core.dll)

See Also

ResourceHandlersSectionHandler Members | Spring.Context.Support Namespace | IResource