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

WindsorContainer

Implementation of IWindsorContainer which delegates to IKernel implementation.

public virtual object this[string key] { get; }

public virtual object this[Type service] { get; }

public virtual IKernel Kernel { get; }

Returns the inner instance of the MicroKernel

public string Name { get; }

Gets the container's name

public virtual IWindsorContainer Parent { get; set; }

Gets or sets the parent container if this instance is a sub container.

Constructs a container without any external configuration reference

Constructs a container using the specified IConfigurationStore implementation.

Constructs a container using the specified IConfigurationInterpreter implementation.

public WindsorContainer(IConfigurationInterpreter interpreter, IEnvironmentInfo environmentInfo)

Initializes a new instance of the WindsorContainer class.

public WindsorContainer(string configurationUri)

Initializes a new instance of the WindsorContainer class using a resource pointed to by the parameter. That may be a file, an assembly embedded resource, a UNC path or a config file section.

Equivalent to the use of new WindsorContainer(new XmlInterpreter(configurationUri))

public WindsorContainer(IKernel kernel, IComponentsInstaller installer)

Constructs a container using the specified IKernel implementation. Rarely used.

public WindsorContainer(string name, IKernel kernel, IComponentsInstaller installer)

Constructs a container using the specified IKernel implementation. Rarely used.

public WindsorContainer(IProxyFactory proxyFactory)

Constructs with a given IProxyFactory.

Constructs a container assigning a parent container before starting the dependency resolution.

public WindsorContainer(string name, IWindsorContainer parent, IConfigurationInterpreter interpreter)

Initializes a new instance of the WindsorContainer class.

public virtual void AddChildContainer(IWindsorContainer childContainer)

Registers a subcontainer. The components exposed by this container will be accessible from subcontainers.

public virtual IWindsorContainer AddComponent(string key, Type classType)

public virtual IWindsorContainer AddComponent(string key, Type serviceType, Type classType)

public IWindsorContainer AddComponent<T>(string key)

public IWindsorContainer AddComponent<I, T>(string key)

public IWindsorContainer AddComponentLifeStyle(string key, Type classType, LifestyleType lifestyle)

public IWindsorContainer AddComponentLifeStyle(string key, Type serviceType, Type classType, LifestyleType lifestyle)

public IWindsorContainer AddComponentLifeStyle<T>(string key, LifestyleType lifestyle)

public IWindsorContainer AddComponentLifeStyle<I, T>(string key, LifestyleType lifestyle)

public IWindsorContainer AddComponentProperties<I, T>(IDictionary extendedProperties)

public IWindsorContainer AddComponentProperties<I, T>(string key, IDictionary extendedProperties)

public virtual IWindsorContainer AddComponentWithProperties(string key, Type classType, IDictionary extendedProperties)

public virtual IWindsorContainer AddComponentWithProperties(string key, Type serviceType, Type classType, IDictionary extendedProperties)

public IWindsorContainer AddComponentWithProperties<T>(string key, IDictionary extendedProperties)

Registers a facility within the container.

public IWindsorContainer AddFacility<T>() where T : IFacility

Creates and adds an IFacility facility to the container.

public IWindsorContainer AddFacility<T>(Action<T> onCreate) where T : IFacility

Creates and adds an IFacility facility to the container.

public virtual IWindsorContainer AddFacility(string idInConfiguration, IFacility facility)

Registers a facility within the container.

public IWindsorContainer AddFacility<T>(string idInConfiguration) where T : IFacility

Creates and adds an IFacility facility to the container.

public IWindsorContainer AddFacility<T>(string idInConfiguration, Action<T> configureFacility) where T : IFacility

Creates and adds an IFacility facility to the container.

public virtual void Dispose()

Executes Dispose on underlying IKernel

Gets a child container instance by name.

Runs the installers so that they can register components in the container. For details see the documentation at http://j.mp/WindsorInstall

public IWindsorContainer Register(IRegistration[] registrations)

Registers the components with the IWindsorContainer. 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. For details see the documentation at http://j.mp/WindsorApi

public virtual void Release(object instance)

Releases a component instance

public virtual void RemoveChildContainer(IWindsorContainer childContainer)

Removes (unregisters) a subcontainer. The components exposed by this container will no longer be accessible to the child container.

public virtual object Resolve(Type service, IDictionary arguments)

Returns a component instance by the service

public virtual object Resolve(Type service, object argumentsAsAnonymousType)

Returns a component instance by the service

public virtual object Resolve(Type service)

Returns a component instance by the service

public virtual object Resolve(string key, Type service)

Returns a component instance by the key

public virtual object Resolve(string key, Type service, IDictionary arguments)

Returns a component instance by the key

public virtual object Resolve(string key, Type service, object argumentsAsAnonymousType)

Returns a component instance by the key

public T Resolve<T>(IDictionary arguments)

Returns a component instance by the service

public T Resolve<T>(object argumentsAsAnonymousType)

Returns a component instance by the service

public virtual T Resolve<T>(string key, IDictionary arguments)

Returns a component instance by the key

public virtual T Resolve<T>(string key, object argumentsAsAnonymousType)

Returns a component instance by the key

public T Resolve<T>()

Returns a component instance by the service

public virtual T Resolve<T>(string key)

Returns a component instance by the key

public virtual object Resolve(string key, IDictionary arguments)

Returns a component instance by the key

public virtual object Resolve(string key, object argumentsAsAnonymousType)

Returns a component instance by the key

public T[] ResolveAll<T>()

Resolve all valid components that match this type.

public Array ResolveAll(Type service)

public Array ResolveAll(Type service, IDictionary arguments)

public Array ResolveAll(Type service, object argumentsAsAnonymousType)

public T[] ResolveAll<T>(IDictionary arguments)

Resolve all valid components that match this type. The service typeArguments to resolve the service

public T[] ResolveAll<T>(object argumentsAsAnonymousType)

Resolve all valid components that match this type. The service typeArguments to resolve the service

protected virtual void RunInstaller()