<PackageReference Include="Castle.Windsor" Version="2.5.3" />

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)
using Castle.Core; using Castle.MicroKernel.Context; using System; namespace Castle.MicroKernel { public interface IHandler : ISubDependencyResolver { HandlerState CurrentState { get; } ComponentModel ComponentModel { get; } Type Service { get; } event HandlerStateDelegate OnHandlerStateChanged; void Init(IKernel kernel); object Resolve(CreationContext context); object TryResolve(CreationContext context); bool Release(object instance); void AddCustomDependencyValue(object key, object value); void RemoveCustomDependencyValue(object key); bool HasCustomParameter(object key); bool IsBeingResolvedInContext(CreationContext context); } }