Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

GenericApplicationContext Class

Generic ApplicationContext implementation that holds a single internal DefaultListableObjectFactory instance and does not assume a specific object definition format.

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


[Visual Basic]
<DefaultMember(MemberName:="Item")> _
Public Class GenericApplicationContext
    Inherits AbstractApplicationContext
public class GenericApplicationContext : AbstractApplicationContext

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.


Implements the IObjectDefinitionRegistry interface in order to allow for aplying any object definition readers to it.

Typical usage is to register a variety of object definitions via the IObjectDefinitionRegistry interface and then call Refresh to initialize those objects with application context semantics (handling IApplicationContextAware, auto-detecting IObjectPostProcessor ObjectFactoryPostProcessors, etc).

In contrast to other IApplicationContext implementations that create a new internal IObjectFactory instance for each refresh, the internal IObjectFactory of this context is available right from the start, to be able to register object definitions on it. Refresh may only be called once

Usage examples

GenericApplicationContext ctx = new GenericApplicationContext(); // register your objects and object definitions ctx.RegisterObjectDefinition(...) ctx.Refresh();


Namespace: Spring.Context.Support

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

See Also

GenericApplicationContext Members | Spring.Context.Support Namespace