See Also

IInitializingObject Members  | Spring.Objects.Factory Namespace  | IObjectFactory Interface

Requirements

Namespace: Spring.Objects.Factory

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

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

Language

Visual Basic

C#

Show All

See Also Requirements Languages Spring.Core Send comments on this topic.

IInitializingObject Interface

Spring.Objects.Factory Namespace : IInitializingObject Interface

Defines a simple initialization callback for objects that need to to some post-initialization logic after all of their dependencies have been injected.

For a list of all members of this type, see IInitializingObject members.

Syntax

[Visual Basic]
Public Interface IInitializingObject
[C#]
public interface IInitializingObject

Remarks

An implementation of the Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet method might perform some additional custom initialization (over and above that performed by the constructor), or merely check that all mandatory properties have been set (this last example is a very typical use case of this interface).

The use of the IInitializingObject interface by non-Spring.NET framework code can be avoided (and is generally discouraged). The Spring.NET container provides support for a generic initialization method given to the object definition in the object configuration store (be it XML, or a database, etc). This requires slightly more configuration (one attribute-value pair in the case of XML configuration), but removes any dependency on Spring.NET from the class definition.

Requirements

Namespace: Spring.Objects.Factory

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

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

See Also

IInitializingObject Members  | Spring.Objects.Factory Namespace  | IObjectFactory Interface

 

 


© 2004-2007 Spring.NET Authors. All Rights Reserved.