|Visual Basic (Declaration)|
Public Interface IApplicationContextAware
|Visual Basic (Usage)||Copy Code|
public interface IApplicationContextAware
Implementing this interface makes sense when an object requires access to a set of collaborating objects. Note that configuration via object references is preferable to implementing this interface just for object lookup purposes.
This interface can also be implemented if an object needs access to file resources, i.e. wants to call Spring.Core.IO.IResourceLoader.GetResource, or access to the IMessageSource. However, it is preferable to implement the more specific IResourceLoaderAware interface to receive a reference to the IMessageSource object in that scenario.
Note that Spring.Core.IO.IResource dependencies can also be exposed as object properties of the Spring.Core.IO.IResource type, populated via strings with automatic type conversion performed by an object factory. This obviates the need for implementing any callback interface just for the purpose of accessing a specific file resource.
ApplicationObjectSupport is a convenience implementation of this interface for your application objects.
For a list of all object lifecycle methods, see the overview for the Spring.Objects.Factory.IObjectFactory interface.
Platforms:Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7
Assembly: Spring.Core (in Spring.Core.dll)