Home

Castle Stronghold

IWindsorContainer API Document

The IWindsorContainer interface exposes all the functionality the Windsor implements.

Properties

NameTypeDescription
ItemObject Shortcut to the method Castle.Windsor.IWindsorContainer.Resolve(System.String)
ItemObject Shortcut to the method Castle.Windsor.IWindsorContainer.Resolve(System.String)
KernelIKernel Returns the inner instance of the MicroKernel
ParentIWindsorContainer Gets or sets the parent container if this instance is a sub container.

Methods

RemoveChildContainer(IWindsorContainer childContainer)

Remove a child container

ParameterDescription
childContainer

AddChildContainer(IWindsorContainer childContainer)

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

ParameterDescription
childContainer

Release(Object instance)

Releases a component instance

ParameterDescription
instance

Resolve(Type service) : Object

Returns a component instance by the service

ParameterDescription
service

Resolve(String key) : Object

Returns a component instance by the key

ParameterDescription
key

AddComponentWithProperties(String key, Type serviceType, Type classType, IDictionary extendedProperties)

Adds a concrete class and an interface as a component and specify the extended properties. Used by facilities, mostly.

ParameterDescription
key
serviceType
classType
extendedProperties

AddComponentWithProperties(String key, Type classType, IDictionary extendedProperties)

Adds a concrete class as a component and specify the extended properties. Used by facilities, mostly.

ParameterDescription
key
classType
extendedProperties

AddComponentWithLifestyle(String key, Type serviceType, Type classType, LifestyleType lifestyle)

Adds a component to be managed by the container

ParameterDescription
key The key by which the component gets indexed.
serviceType The service System.Type that the component implements.
classType The System.Type to manage.
lifestyle The Castle.Core.LifestyleType with which to manage the component.

AddComponentWithLifestyle(String key, Type classType, LifestyleType lifestyle)

Adds a component to be managed by the container

ParameterDescription
key The key by which the component gets indexed.
classType The System.Type to manage.
lifestyle The Castle.Core.LifestyleType with which to manage the component.

AddComponent(String key, Type serviceType, Type classType)

Adds a component to be managed by the container

ParameterDescription
key The key by which the component gets indexed.
serviceType The service System.Type that the component implements.
classType The System.Type to manage.

AddComponent(String key, Type classType)

Adds a component to be managed by the container

ParameterDescription
key The key by which the component gets indexed.
classType The System.Type to manage.

AddFacility(String key, IFacility facility)

Registers a facility within the kernel.

ParameterDescription
key The key by which the Castle.MicroKernel.IFacility gets indexed.
facility The Castle.MicroKernel.IFacility to add to the container.

Google
Search WWW Search castleproject.org