Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

SimpleInstantiationStrategy.InstantiateWithMethodInjection(RootObjectDefinition, String, IObjectFactory) Method

Instantiate an instance of the object described by the supplied definition from the supplied factory, injecting methods as appropriate.

[Visual Basic]
Protected Overridable Overloads Sub InstantiateWithMethodInjection( _
   ByVal definition As RootObjectDefinition, _
   ByVal objectName As String, _
   ByVal factory As IObjectFactory _
)
[C#]
protected virtual object InstantiateWithMethodInjection(
   RootObjectDefinition definition,
   string objectName,
   IObjectFactory factory
);

Parameters

definition
The definition of the object that is to be instantiated.
objectName
The name associated with the object definition. The name can be a or zero length string if we're autowiring an object that doesn't belong to the supplied factory.
factory
The owning IObjectFactory

Return Value

An instance of the object described by the supplied definition from the supplied factory.

Remarks

The default implementation of this method is to throw a InvalidOperationException.

Derived classes can override this method if they can instantiate an object with the Method Injection specified in the supplied definition. Instantiation should use a no-arg constructor.

See Also

SimpleInstantiationStrategy Class | Spring.Objects.Factory.Support Namespace | SimpleInstantiationStrategy.InstantiateWithMethodInjection Overload List