Table of contents
- 1 Properties
- 2 Methods
- 2.1 RemoveChildContainer(IWindsorContainer childContainer)
- 2.2 AddChildContainer(IWindsorContainer childContainer)
- 2.3 Release(Object instance)
- 2.4 Resolve(Type service) : Object
- 2.5 Resolve(String key) : Object
- 2.6 AddComponentWithProperties(String key, Type serviceType, Type classType, IDictionary extendedProperties)
- 2.7 AddComponentWithProperties(String key, Type classType, IDictionary extendedProperties)
- 2.8 AddComponentWithLifestyle(String key, Type serviceType, Type classType, LifestyleType lifestyle)
- 2.9 AddComponentWithLifestyle(String key, Type classType, LifestyleType lifestyle)
- 2.10 AddComponent(String key, Type serviceType, Type classType)
- 2.11 AddComponent(String key, Type classType)
- 2.12 AddFacility(String key, IFacility facility)
IWindsorContainer API Document
The IWindsorContainer interface exposes all the functionality the Windsor implements.
Properties
| Name | Type | Description |
|---|---|---|
| Item | Object | Shortcut to the method Castle.Windsor.IWindsorContainer.Resolve(System.String) |
| Item | Object | Shortcut to the method Castle.Windsor.IWindsorContainer.Resolve(System.String) |
| Kernel | IKernel | Returns the inner instance of the MicroKernel |
| Parent | IWindsorContainer | Gets or sets the parent container if this instance is a sub container. |
Methods
RemoveChildContainer(IWindsorContainer childContainer)
Remove a child container
| Parameter | Description |
|---|---|
| childContainer |
AddChildContainer(IWindsorContainer childContainer)
Registers a subcontainer. The components exposed by this container will be accessible from subcontainers.
| Parameter | Description |
|---|---|
| childContainer |
Release(Object instance)
Releases a component instance
| Parameter | Description |
|---|---|
| instance |
Resolve(Type service) : Object
Returns a component instance by the service
| Parameter | Description |
|---|---|
| service |
Resolve(String key) : Object
Returns a component instance by the key
| Parameter | Description |
|---|---|
| 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.
| Parameter | Description |
|---|---|
| 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.
| Parameter | Description |
|---|---|
| key | |
| classType | |
| extendedProperties |
AddComponentWithLifestyle(String key, Type serviceType, Type classType, LifestyleType lifestyle)
Adds a component to be managed by the container
| Parameter | Description |
|---|---|
| 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
| Parameter | Description |
|---|---|
| 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
| Parameter | Description |
|---|---|
| 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
| Parameter | Description |
|---|---|
| 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.
| Parameter | Description |
|---|---|
| key | The key by which the Castle.MicroKernel.IFacility gets indexed. |
| facility | The Castle.MicroKernel.IFacility to add to the container. |