<PackageReference Include="castle.windsor" Version="2.5.2" />

IHandler

public interface IHandler : ISubDependencyResolver
Contract for the IHandler, which manages an component state and coordinates its creation and destruction (dispatching to activators, lifestyle managers)

Gets the model of the component being managed by this handler.

Gets the state of the handler

Type Service { get; }

The service that this handler handles

Allow to track state changes of a handler that is modified directly. This can happen if the client calls AddCustomDependencyValue or RemoveCustomDependencyValue

void AddCustomDependencyValue(object key, object value)

Dictionary of String/object used to associate data with a component dependency. For example, if you component SmtpServer depends on host and port, you can add those to this dictionary and the handler will be able to use them.

bool HasCustomParameter(object key)

TODO: Document this

void Init(IKernel kernel)

Initializes the handler with a reference to the kernel.

Tests whether the handler is already being resolved in given context.

bool Release(object instance)

Implementors should dispose the component instance

void RemoveCustomDependencyValue(object key)

TODO: Document this

object Resolve(CreationContext context)

Implementors should return a valid instance for the component the handler is responsible. It should throw an exception in the case the component can't be created for some reason

object TryResolve(CreationContext context)

Implementors should return a valid instance for the component the handler is responsible. It should return null in the case the component can't be created for some reason