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

IKernel

public interface IKernel : IKernelEvents, IDisposable
The IKernel interface exposes all the functionality the MicroKernel implements.

Returns the implementation of IComponentModelBuilder

Gets or sets the implementation of IConfigurationStore

GraphNode[] GraphNodes { get; }

Graph of components and interactions.

Returns the implementation of IHandlerFactory

IKernel Parent { get; set; }

Returns the parent kernel

Gets or sets the implementation of IProxyFactory allowing different strategies for proxy creation.

Gets or sets the implementation for IReleasePolicy

Returns the implementation for IDependencyResolver

void AddChildKernel(IKernel kernel)

Support for kernel hierarchy

Adds a IFacility to the kernel.

IKernel AddFacility<T>() where T : IFacility

Creates and adds an IFacility facility to the kernel.

IKernel AddFacility<T>(Action<T> onCreate) where T : IFacility

Creates and adds an IFacility facility to the kernel.

Register a new component resolver that can take part in the decision making about which handler to resolve

Register a new component resolver that can take part in the decision making about which handler(s) to resolve and in which order

void AddSubSystem(string name, ISubSystem subsystem)

Adds (or replaces) an ISubSystem

Return handlers for components that implements the specified service. The check is made using IsAssignableFrom

Returns the facilities registered on the kernel.

IHandler GetHandler(string name)

Returns the IHandler for the specified component name.

Returns the IHandler for the specified service.

Returns the IHandler for the all components.

Return handlers for components that implements the specified service.

ISubSystem GetSubSystem(string name)

Returns an implementation of ISubSystem for the specified name. SubSystemConstants

bool HasComponent(string name)

Returns true if a component with given name was registered, otherwise false.

bool HasComponent(Type service)

Returns true if the specified service was registered

IKernel Register(IRegistration[] registrations)

Registers the components with the IKernel. The instances of IRegistration are produced by fluent registration API. Most common entry points are For<T> method to register a single type or (recommended in most cases) FromAssembly. Let the Intellisense drive you through the fluent API past those entry points.

void ReleaseComponent(object instance)

Releases a component instance. This allows the kernel to execute the proper decommission lifecycles on the component instance.

Remove child kernel

object Resolve(Type service)

Returns the component instance by the service type

object Resolve(Type service, Arguments arguments)

Returns the component instance by the service type using dynamic arguments

object Resolve(string key, Type service)

Returns a component instance by the key

T Resolve<T>(Arguments arguments)

Returns the component instance by the service type using dynamic arguments

T Resolve<T>()

Returns the component instance by the component key

T Resolve<T>(string key)

Returns a component instance by the key

T Resolve<T>(string key, Arguments arguments)

Returns a component instance by the key

object Resolve(string key, Type service, Arguments arguments)

Returns a component instance by the key

Returns all the valid component instances by the service type

Array ResolveAll(Type service, Arguments arguments)

Returns all the valid component instances by the service type

TService[] ResolveAll<TService>()

Returns component instances that implement TService

TService[] ResolveAll<TService>(Arguments arguments)

Returns component instances that implement TService