Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

DefaultListableObjectFactory.RegisterResolvableDependency Method

Register a special dependency type with corresponding autowired value.

[Visual Basic]
Public NotOverridable Sub RegisterResolvableDependency( _
   ByVal dependencyType As Type, _
   ByVal autowiredValue As Object _
) _
    Implements IConfigurableListableObjectFactory.RegisterResolvableDependency
[C#]
public void RegisterResolvableDependency(
   Type dependencyType,
   object autowiredValue
);

Parameters

dependencyType
Type of the dependency to register. This will typically be a base interface such as IObjectFactory, with extensions of it resolved as well if declared as an autowiring dependency (e.g. IListableBeanFactory), as long as the given value actually implements the extended interface.
autowiredValue
The autowired value. This may also be an implementation o the IObjectFactory interface, which allows for lazy resolution of the actual target value.

Implements

IConfigurableListableObjectFactory.RegisterResolvableDependency

Remarks

This is intended for factory/context references that are supposed to be autowirable but are not defined as objects in the factory: e.g. a dependency of type ApplicationContext resolved to the ApplicationContext instance that the object is living in.

Note there are no such default types registered in a plain IObjectFactory, not even for the BeanFactory interface itself.

See Also

DefaultListableObjectFactory Class | Spring.Objects.Factory.Support Namespace