GenericApplicationContext Class
Members  See Also  Send comments on this topic.
Spring.Context.Support Namespace : GenericApplicationContext Class

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

Object Model



Implements the Spring.Objects.Factory.Support.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 Spring.Objects.Factory.Support.IObjectDefinitionRegistry interface and then call IConfigurableApplicationContext.Refresh to initialize those objects with application context semantics (handling IApplicationContextAware, auto-detecting Spring.Objects.Factory.Config.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. IConfigurableApplicationContext.Refresh may only be called once

Usage examples

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

Inheritance Hierarchy



Namespace: Spring.Context.Support

Platforms:Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7

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

See Also

© 2011 All Rights Reserved.