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

IKernel

public interface IKernel : IKernelEvents, IDisposable
The IKernel interface exposes all the functionality the MicroKernel implements.
using Castle.Core; using Castle.Core.Internal; using Castle.MicroKernel.Registration; using Castle.MicroKernel.SubSystems.Configuration; using System; using System.Collections; using System.ComponentModel; namespace Castle.MicroKernel { public interface IKernel : IKernelEvents, IDisposable { IComponentModelBuilder ComponentModelBuilder { get; } IConfigurationStore ConfigurationStore { get; set; } GraphNode[] GraphNodes { get; } IHandlerFactory HandlerFactory { get; } IKernel Parent { get; set; } IProxyFactory ProxyFactory { get; set; } IReleasePolicy ReleasePolicy { get; set; } IDependencyResolver Resolver { get; } [Obsolete("Use Resolve<object>(key) instead")] [EditorBrowsable(EditorBrowsableState.Never)] object this[string key] { get; } [Obsolete("Use Resolve(service) or generic strongly typed version instead")] [EditorBrowsable(EditorBrowsableState.Never)] object this[Type service] { get; } void AddChildKernel(IKernel kernel); IKernel AddFacility(IFacility facility); IKernel AddFacility<T>() where T : IFacility, new; IKernel AddFacility<T>(Action<T> onCreate) where T : IFacility, new; void AddHandlerSelector(IHandlerSelector selector); void AddHandlersFilter(IHandlersFilter filter); void AddSubSystem(string name, ISubSystem subsystem); IHandler[] GetAssignableHandlers(Type service); IFacility[] GetFacilities(); IHandler GetHandler(string name); IHandler GetHandler(Type service); IHandler[] GetHandlers(Type service); ISubSystem GetSubSystem(string name); bool HasComponent(string name); bool HasComponent(Type service); IKernel Register(params IRegistration[] registrations); void ReleaseComponent(object instance); void RemoveChildKernel(IKernel kernel); [Obsolete("Use Register(Component.For(classType).Named(key)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent(string key, Type classType); [Obsolete("Use Register(Component.For(classType).Named(key).Lifestyle.Is(lifestyle)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent(string key, Type classType, LifestyleType lifestyle); [Obsolete("Use Register(Component.For(classType).Named(key).Lifestyle.Is(lifestyle)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent(string key, Type classType, LifestyleType lifestyle, bool overwriteLifestyle); [Obsolete("Use Register(Component.For(serviceType).ImplementedBy(classType).Named(key)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent(string key, Type serviceType, Type classType); [Obsolete("Use Register(Component.For(serviceType).ImplementedBy(classType).Named(key).Lifestyle.Is(lifestyle)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent(string key, Type serviceType, Type classType, LifestyleType lifestyle); [Obsolete("Use Register(Component.For(serviceType).ImplementedBy(classType).Named(key).Lifestyle.Is(lifestyle)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent(string key, Type serviceType, Type classType, LifestyleType lifestyle, bool overwriteLifestyle); [Obsolete("Use Register(Component.For<T>()) instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent<T>(); [Obsolete("Use Register(Component.For<T>().Lifestyle.Is(lifestyle)) instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent<T>(LifestyleType lifestyle); [Obsolete("Use Register(Component.For<T>().Lifestyle.Is(lifestyle)) instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent<T>(LifestyleType lifestyle, bool overwriteLifestyle); [Obsolete("Use Register(Component.For(serviceType).ImplementedBy<T>()) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent<T>(Type serviceType); [Obsolete("Use Register(Component.For(serviceType).ImplementedBy<T>().Lifestyle.Is(lifestyle)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent<T>(Type serviceType, LifestyleType lifestyle); [Obsolete("Use Register(Component.For(serviceType).ImplementedBy<T>().Lifestyle.Is(lifestyle)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponent<T>(Type serviceType, LifestyleType lifestyle, bool overwriteLifestyle); [Obsolete("Use Register(Component.For<T>().Instance(instance)) instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponentInstance<T>(object instance); [Obsolete("Use Register(Component.For(serviceType).ImplementedBy<T>().Instance(instance)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponentInstance<T>(Type serviceType, object instance); [Obsolete("Use Register(Component.For(instance.GetType()).Named(key).Instance(instance)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponentInstance(string key, object instance); [Obsolete("Use Register(Component.For(serviceType).Named(key).Instance(instance)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponentInstance(string key, Type serviceType, object instance); [Obsolete("Use Register(Component.For(serviceType).ImplementedBy(classType).Named(key).Instance(instance)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponentInstance(string key, Type serviceType, Type classType, object instance); [Obsolete("Use Register(Component.For(classType).Named(key).ExtendedProperties(extendedProperties)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponentWithExtendedProperties(string key, Type classType, IDictionary extendedProperties); [Obsolete("Use Register(Component.For(serviceType).ImplementedBy(classType).Named(key).ExtendedProperties(extendedProperties)) or generic version instead.")] [EditorBrowsable(EditorBrowsableState.Never)] void AddComponentWithExtendedProperties(string key, Type serviceType, Type classType, IDictionary extendedProperties); [Obsolete("Use AddFacility(IFacility) instead.")] [EditorBrowsable(EditorBrowsableState.Never)] IKernel AddFacility(string key, IFacility facility); [Obsolete("Use AddFacility<TFacility>() instead.")] [EditorBrowsable(EditorBrowsableState.Never)] IKernel AddFacility<T>(string key) where T : IFacility, new; [Obsolete("Use AddFacility<TFacility>(Action<TFacility>) instead.")] [EditorBrowsable(EditorBrowsableState.Never)] IKernel AddFacility<T>(string key, Action<T> onCreate) where T : IFacility, new; [Obsolete("Use Resolve<object>(key, argumentsAsAnonymousType) instead")] [EditorBrowsable(EditorBrowsableState.Never)] object Resolve(string key, object argumentsAsAnonymousType); [Obsolete("Use Resolve<object>(key, arguments) instead")] [EditorBrowsable(EditorBrowsableState.Never)] object Resolve(string key, IDictionary arguments); object Resolve(Type service); object Resolve(Type service, IDictionary arguments); object Resolve(Type service, object argumentsAsAnonymousType); object Resolve(string key, Type service); T Resolve<T>(IDictionary arguments); T Resolve<T>(object argumentsAsAnonymousType); T Resolve<T>(); T Resolve<T>(string key); T Resolve<T>(string key, IDictionary arguments); object Resolve(string key, Type service, IDictionary arguments); Array ResolveAll(Type service); Array ResolveAll(Type service, IDictionary arguments); Array ResolveAll(Type service, object argumentsAsAnonymousType); TService[] ResolveAll<TService>(); TService[] ResolveAll<TService>(IDictionary arguments); TService[] ResolveAll<TService>(object argumentsAsAnonymousType); } }