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

Castle.MicroKernel.DefaultKernel

Default implementation of IKernel. This implementation is complete and also support a kernel hierarchy (sub containers).
namespace Castle.MicroKernel { public class DefaultKernel : MarshalByRefObject, IKernel, IKernelEvents, IDisposable, IKernelInternal { public IComponentModelBuilder ComponentModelBuilder { get; set; } public virtual IConfigurationStore ConfigurationStore { get; set; } public GraphNode[] GraphNodes { get; } public IHandlerFactory HandlerFactory { get; } public virtual IKernel Parent { get; set; } public IProxyFactory ProxyFactory { get; set; } public IReleasePolicy ReleasePolicy { get; set; } public IDependencyResolver Resolver { get; } protected IConversionManager ConversionSubSystem { get; } protected INamingSubSystem NamingSubSystem { get; } public ILogger Logger { get; set; } public event HandlerDelegate HandlerRegistered; public event HandlersChangedDelegate HandlersChanged; public event ComponentDataDelegate ComponentRegistered; public event ComponentInstanceDelegate ComponentCreated; public event ComponentInstanceDelegate ComponentDestroyed; public event EventHandler AddedAsChildKernel; public event EventHandler RegistrationCompleted; public event EventHandler RemovedAsChildKernel; public event ComponentModelDelegate ComponentModelCreated; public event DependencyDelegate DependencyResolving; public event ServiceDelegate EmptyCollectionResolving; public DefaultKernel(); public DefaultKernel(IDependencyResolver resolver, IProxyFactory proxyFactory); public DefaultKernel(IProxyFactory proxyFactory); public DefaultKernel(SerializationInfo info, StreamingContext context); public void GetObjectData(SerializationInfo info, StreamingContext context); public virtual void Dispose(); public virtual void AddChildKernel(IKernel childKernel); public virtual IHandler AddCustomComponent(ComponentModel model); public virtual IKernel AddFacility(IFacility facility); public IKernel AddFacility<T>() where T : IFacility, new; public IKernel AddFacility<T>(Action<T> onCreate) where T : IFacility, new; public void AddHandlerSelector(IHandlerSelector selector); public void AddHandlersFilter(IHandlersFilter filter); public virtual void AddSubSystem(string name, ISubSystem subsystem); public virtual IHandler[] GetAssignableHandlers(Type service); public virtual IFacility[] GetFacilities(); public virtual IHandler GetHandler(string name); public virtual IHandler GetHandler(Type service); public virtual IHandler[] GetHandlers(Type service); public virtual IHandler[] GetHandlers(); public virtual ISubSystem GetSubSystem(string name); public virtual bool HasComponent(string name); public virtual bool HasComponent(Type serviceType); public IKernel Register(params IRegistration[] registrations); public virtual void ReleaseComponent(object instance); public virtual void RemoveChildKernel(IKernel childKernel); public virtual ILifestyleManager CreateLifestyleManager(ComponentModel model, IComponentActivator activator); public virtual IComponentActivator CreateComponentActivator(ComponentModel model); protected CreationContext CreateCreationContext(IHandler handler, Type requestedType, Arguments additionalArguments, CreationContext parent, IReleasePolicy policy); protected void DisposeHandler(IHandler handler); protected virtual void RegisterSubSystems(); protected object ResolveComponent(IHandler handler, Type service, Arguments additionalArguments, IReleasePolicy policy); protected virtual IHandler WrapParentHandler(IHandler parentHandler); public IDisposable OptimizeDependencyResolution(); protected virtual void RaiseAddedAsChildKernel(); protected virtual void RaiseComponentCreated(ComponentModel model, object instance); protected virtual void RaiseComponentDestroyed(ComponentModel model, object instance); protected virtual void RaiseComponentModelCreated(ComponentModel model); protected virtual void RaiseComponentRegistered(string key, IHandler handler); protected virtual void RaiseDependencyResolving(ComponentModel client, DependencyModel model, object dependency); protected virtual void RaiseHandlerRegistered(IHandler handler); protected virtual void RaiseHandlersChanged(); protected virtual void RaiseRegistrationCompleted(); protected virtual void RaiseRemovedAsChildKernel(); public virtual object Resolve(string key, Type service); public virtual object Resolve(string key, Type service, Arguments arguments); public T Resolve<T>(Arguments arguments); public T Resolve<T>(); public T Resolve<T>(string key); public T Resolve<T>(string key, Arguments arguments); public object Resolve(Type service); public object Resolve(Type service, Arguments arguments); public Array ResolveAll(Type service); public Array ResolveAll(Type service, Arguments arguments); public TService[] ResolveAll<TService>(Arguments arguments); public TService[] ResolveAll<TService>(); } }