Home

Castle Stronghold

IComponentActivator API Document

Implements the instance creation logic. The default implementation should rely on an ordinary call to Activator.CreateInstance().

Quick Note

This interface is provided in order to allow custom components to be created using a different logic, such as using a specific factory or builder.

The constructor for implementation has the following signature:

ComponentModel model, IKernel kernel, 
ComponentInstanceDelegate onCreation, 
ComponentInstanceDelegate onDestruction

The Activator should raise the events onCreation and onDestruction in order to correctly implement the contract. Usually the best way of creating a custom activator is by extending the existing ones.

Methods

Destroy(Object instance)

Should perform all necessary work to dispose the instance and/or any resource related to it.

ParameterDescription
instance

Create(CreationContext context) : Object

Should return a new component instance.

ParameterDescription
context Missing documentation

Google
Search WWW Search castleproject.org