Castle.Windsor Attempts to dynamically load a UserControl by invoking Page.LoadControl. There are two uses of this class. 1) Add a component to the Kernel and add a VirtualPath attribute specifying the relative path of the .ascx file for the associated UserControl. (easy) <component id="BasketView" service="Castle.ShoppingCart.IBasketView, Castle.ShoppingCart" type="Castle.ShoppingCart.BasketView, Castle.ShoppingCart" lifestyle="transient" virtualPath="~/Views/BasketView.ascx" /> 2) Precompile a UserControl and add the pre-compiled class to the Kernel. (hard) Has not been tested with proxies. Standard implementation of . Handles the selection of the best constructor, fills the writable properties the component exposes, run the commission and decommission lifecycles, etc. Custom implementors can just override the CreateInstance method. Please note however that the activator is responsible for the proxy creation when needed. Abstract implementation of . The implementors must only override the InternalCreate and InternalDestroy methods in order to perform their creation and destruction logic. Implements the instance creation logic. The default implementation should rely on an ordinary call to Activator.CreateInstance(). This interface is provided in order to allow custom components to be created using a different logic, such as using a specific factory or builder. The constructor for implementation has the following signature: ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction The Activator should raise the events onCreation and onDestruction in order to correctly implement the contract. Usually the best way of creating a custom activator is by extending the existing ones. Should return a new component instance. Should perform all necessary work to dispose the instance and/or any resource related to it. Constructs an AbstractComponentActivator Initializes a new instance of the class. Initializes a new instance of the class. The model. The kernel. The on creation. The on destruction. Creates the instance. The context. The arguments. The signature. Implements a Lifestyle Manager for Web Apps that create at most one object per web request. Summary description for AbstractLifestyleManager. The ILifestyleManager implements a strategy for a given lifestyle, like singleton, per-thread and transient. The responsibility of ILifestyleManager is only the management of lifestyle. It should rely on to obtain a new component instance Initializes the ILifestyleManager with the Implementors should return the component instance based on the lifestyle semantic. Implementors should release the component instance based on the lifestyle semantic, for example, singleton components should not be released on a call for release, instead they should release them when disposed is invoked. This attribute is useful only when you want to register all components on an assembly as a batch process. By doing so, the batch register will look for this attribute to distinguish components from other classes. Base for Attributes that want to express lifestyle chosen by the component. Initializes a new instance of the class. The type. Gets or sets the lifestyle. The lifestyle. Associates a custom component with a component Initializes a new instance of the class. Type of the component activator. Gets the type of the component activator. The type of the component activator. Specifies the proxying behavior for a component. Gets or sets a value indicating whether the generated interface proxy should inherit from . Determines if the component requires a single interface proxy. true if the component requires a single interface proxy. Gets or sets the additional interfaces used during proxy generation. Marks as property to be skipped and not be wired by the IoC container Represents a concern that will be applied to a component instance during commission or decommission phase. Implementors should act on the instance in response to a decommission or commission phase. The model. The component. Lifecycle interface. If implemented by a component, the method Initialized will be invoked by the container before making the component available to the external world. Implementors should perform any initialization logic. Used to declare that a component wants interceptors acting on it. Constructs the InterceptorAttribute pointing to a key to a interceptor Constructs the InterceptorAttribute pointing to a service Marker class used to denote components that have late bound type That is the actual type is not known exactly at the time when is created. Those are for example components instantiated via abstract factory. If the extended type is a Foo[] or IEnumerable{Foo} which is assignable from Foo[] this method will return typeof(Foo) otherwise null. Indicates that the target components wants a singleton lifestyle. Initializes a new instance of the class. Indicates that the target components wants a transient lifestyle. Initializes a new instance of the class. Indicates that the target components wants a per thread lifestyle. Initializes a new instance of the class. Indicates that the target components wants a per web request lifestyle. Indicates that the target components wants a pooled lifestyle. Initializes a new instance of the class using the default initial pool size (5) and the max pool size (15). Initializes a new instance of the class. Initial size of the pool. Max pool size. Gets the initial size of the pool. The initial size of the pool. Gets the maximum pool size. The size of the max pool. Indicates that the target components wants a custom lifestyle. Initializes a new instance of the class. The lifestyle handler. Gets the type of the lifestyle handler. The type of the lifestyle handler. Enumeration used to mark the component's lifestyle. No lifestyle specified. Singleton components are instantiated once, and shared between all clients. Thread components have a unique instance per thread. Transient components are created on demand. Optimization of transient components that keeps instance in a pool instead of always creating them. PerWebRequest components are created once per Http Request Any other logic to create/release components. Collects information about subscribers for given event Extracts MethodInfo of metho invoked in delegate. Based on ILReader class from http://www.gocosmos.org project Implementors must inspect the component for a given information or parameter. Usually the implementation will look in the configuration property of the model or the service interface, or the implementation looking for something. The kernel instance The component model Selects one or both of component name and type, for given method called on given typed factory type. When component should be requested by type only, componentName should be null. When component should be requested by name only, componentType should be null. Builds for given call. By default if is a collection returns for the collection's item type, otherwise standard . Selects arguments to be passed to resolution pipeline. By default passes all given keyed by names of their corresponding parameters. Selects name of the component to resolve. If Name is GetFoo returns "Foo", otherwise null. Selects type of the component to resolve. Uses return type. Provides lazy registration capabilities to the container. When a component is requested from a container and it was not registered, container loads up all registered implementers of this interface and asks them in turn whether they can provide that component, until it finds one that will. Used by container to allow the loader to register component for given and to the container at the time when it is requested Key of the requested component or null Type of requested service or null User supplied arguments or null Registration that registers component for given key and/or service or null. While either key or service can be null reference it is guaranteed that at least one of them will not be null. When implementer opts in to provide the requested component (by returning not-null registration) it is required to register component for requested key/service combination (when one of the elements is null, it should be ignored as well). When implementer does not want to register the requested component it must return null. Summary description for ComponentActivatorException. Represents collection of arguments used when resolving a component. Exception thrown when component has no resolvable constructor that can be used to create an instance. Default arguments store used to store items where no specialized store exists Extends adding and information. The MemberInfo is only useful to provide detailed information on exceptions. The ComponentModel is required so we can get resolve an object that takes as a parameter itself, but with difference model. (See IoC 51 for the details) Represents a dependency (other component or a fixed value available through external configuration). Initializes a new instance of the class. The type. The dependency key. Type of the target. if set to true [is optional]. Returns a that represents the current . A that represents the current . Gets or sets the dependency key. The dependency key. Gets or sets the type of the dependency. The type of the dependency. Gets or sets whether this dependency is optional. true if this dependency is optional; otherwise, false. Gets the service type of the dependency. This is the same type as or if is by ref, then it's the element type of the reference. (in other words if dependency is out IFoo foo this will be IFoo, while will be &IFoo); Gets the type of the target. The type of the target. Summary description for DefaultHandler. Implements the basis of Contract for the IHandler, which manages an component state and coordinates its creation and destruction (dispatching to activators, lifestyle managers) Implementors should use a strategy to obtain valid references to properties and/or services requested in the dependency model. Should return an instance of a service or property values as specified by the dependency model instance. It is also the responsibility of to throw an exception in the case a non-optional dependency could not be resolved. Creation context, which is a resolver itself Parent resolver - normally the IHandler implementation Model of the component that is requesting the dependency The dependency model The dependency resolved value or null Returns true if the resolver is able to satisfy this dependency. Creation context, which is a resolver itself Parent resolver - normally the IHandler implementation Model of the component that is requesting the dependency The dependency model true if the dependency can be satisfied Initializes the handler with a reference to the kernel. Implementors should return a valid instance for the component the handler is responsible. It should throw an exception in the case the component can't be created for some reason Implementors should return a valid instance for the component the handler is responsible. It should return null in the case the component can't be created for some reason Implementors should dispose the component instance true if destroyed. Dictionary of String/object used to associate data with a component dependency. For example, if you component SmtpServer depends on host and port, you can add those to this dictionary and the handler will be able to use them. TODO: Document this TODO: Document this TODO: Document this Tests whether the handler is already being resolved in given context. Gets the state of the handler Gets the model of the component being managed by this handler. The service that this handler handles Allow to track state changes of a handler that is modified directly. This can happen if the client calls AddCustomDependencyValue or RemoveCustomDependencyValue Might be implemented by a handler so it can expose access to dependency information which is used to construct meaningful error messages Returns human readable list of dependencies this handler is waiting for. list of the dependencies that was already checked, used to avoid cycles. Lifestyle manager instance Custom dependencies values associated with the handler Dictionary of key (string) to Dictionary of Type to a list of Constructs and initializes the handler Should be implemented by derived classes: disposes the component instance (or recycle it) true if destroyed. Should be implemented by derived classes: returns an instance of the component this handler is responsible for When false, handler can not create valid instance and return null instead. Returns human readable list of dependencies this handler is waiting for. Saves the kernel instance, subscribes to event, creates the lifestyle manager instance and computes the handler state. disposes the component instance (or recycle it). Returns an instance of the component this handler is responsible for Invoked by in order to check if a dependency can be satisfied. If not, the handler is set to a 'waiting dependency' state. This method registers the dependencies within the correct collection or dictionary and changes the handler state to Creates an implementation of based on and invokes to initialize the newly created manager. Invoked by the kernel when one of registered dependencies were satisfied by new components registered. Handler for the event Checks if the handler is able to, at very least, satisfy the dependencies for the constructor with less parameters For each non*optional dependency, the implementation will invoke Invoked when the container receives a parent container reference. This method implementation checks whether the parent container is able to supply the dependencies for this handler. Returns an instance of the component this handler is responsible for when false, handler can not create valid instance and return null instead Handler for the event Gets the component model. Gets the handler state. Initializes a new instance of the class. Returns an instance of the component this handler is responsible for disposes the component instance (or recycle it) true if destroyed Used during a component request, passed along to the whole process. This allow some data to be passed along the process, which is used to detected cycled dependency graphs and now it's also being used to provide arguments to components. Holds the scoped dependencies being resolved. If a dependency appears twice on the same scope, we'd have a cycle. The list of handlers that are used to resolve the component. We track that in order to try to avoid attempts to resolve a service with itself. Initializes a new instance of the class. The type to extract generic arguments. The parent context. When set to true will clone . Initializes a new instance of the class. The handler. The release policy. The type to extract generic arguments. The additional arguments. The conversion manager. Parent context Initializes a new instance of the class. Method used by handlers to test whether they are being resolved in the context. This method is provided as part of double dispatch mechanism for use by handlers. Outside of handlers, call instead. Creates a new, empty instance. A new CreationContext should be created every time, as the contexts keeps some state related to dependency resolution. Default implementation of . This implementation is complete and also support a kernel hierarchy (sub containers). Default implementation of . This implementation is complete and also support a kernel hierarchy (sub containers). The IKernel interface exposes all the functionality the MicroKernel implements. It allows you to register components and request them by the key or the service they implemented. It also allow you to register facilities and subsystem, thus augmenting the functionality exposed by the kernel alone to fits your needs. Summary description for IKernelEvents. Event fired when a new component is registered on the kernel. Event fired when a component is removed from the kernel. Event fired after the ComponentModel is created. Allows customizations that may affect the handler. Event fired when the kernel was added as child of another kernel. Event fired when the kernel was removed from being a child of another kernel. Event fired before the component is created. Event fired when a component instance destroyed. Event fired when a new handler is registered (it might be in a valid or waiting dependency state) Event fired when a new handler is registered (it might be in a valid or waiting dependency state) Event fired when a dependency is being resolved, it allows the dependency to be changed, but the client ComponentModel must not be changed. Registers the components provided by the s with the . Create a new registration using .For() or . kernel.Register(Component.For<IService>().ImplementedBy<DefaultService>()); The component registrations. The kernel. Returns true if the specified component was found and could be removed (i.e. no other component depends on it) The component's key Returns true if the specified key was registered Returns true if the specified service was registered Associates objects with a component handler, allowing it to use the specified dictionary when resolving dependencies Associates objects with a component handler, allowing it to use the specified dictionary when resolving dependencies Associates objects with a component handler, allowing it to use the specified dictionary when resolving dependencies Associates objects with a component handler, allowing it to use the specified dictionary when resolving dependencies Releases a component instance. This allows the kernel to execute the proper decommission lifecycles on the component instance. Returns the for the specified component key. Returns the for the specified service. Return handlers for components that implements the specified service. Return handlers for components that implements the specified service. The check is made using IsAssignableFrom Adds a to the kernel. Creates and adds an facility to the kernel. The facility type. Creates and adds an facility to the kernel. The facility type. The callback for creation. Creates and adds an facility to the kernel. The facility type. The callback for creation. Creates and adds an facility to the kernel. The facility type. Creates and adds an facility to the kernel. The facility type. The callback for creation. Creates and adds an facility to the kernel. The facility type. The callback for creation. Returns the facilities registered on the kernel. Adds (or replaces) an Returns an implementation of for the specified key. Support for kernel hierarchy Remove child kernel Register a new component resolver that can take part in the decision making about which handler to resolve Returns the component instance by the service type Returns all the valid component instances by the service type The service type Returns all the valid component instances by the service type The service type Arguments to resolve the services Returns all the valid component instances by the service type The service type Arguments to resolve the services Returns the component instance by the service type using dynamic arguments Returns the component instance by the component key using dynamic arguments Returns the component instance by the service type using dynamic arguments Service to resolve Arguments to resolve the services Returns the component instance by the component key using dynamic arguments Key to resolve Arguments to resolve the services Returns a component instance by the key Returns the component instance by the service type using dynamic arguments Returns the component instance by the service type using dynamic arguments Arguments to resolve the services Returns the component instance by the component key Returns a component instance by the key Component's key Service type The Component instance Returns a component instance by the key Service type Component's key The Component instance Returns component instances that implement TService Returns component instances that implement TService Returns component instances that implement TService Returns a component instance by the key Returns the implementation of Returns the implementation of Gets or sets the implementation of Gets or sets the implementation for Returns the implementation for Gets or sets the implementation of allowing different strategies for proxy creation. Returns the parent kernel Graph of components and interactions. Returns the component instance by the key Returns the component instance by the service type Extended contract of kernel, used internally. Constructs an implementation of for the given Raise the handler registered event, required so dependant handlers will be notified about their dependant moving to valid state. Registers the to be forwarded to the component registered with . The service type that gets forwarded. The name of the component to forward to. Adds a custom made . Used by facilities. List of sub containers. List of registered. The implementation of The dependency resolver. Map of subsystems registered. The parent kernel, if exists. Holds the implementation of Implements a policy to control component's disposal that the user forgot. Constructs a DefaultKernel with no component proxy support. Constructs a DefaultKernel with the specified implementation of and Constructs a DefaultKernel with the specified implementation of Starts the process of component disposal. Return handlers for components that implements the specified service. The check is made using IsAssignableFrom Returns the facilities registered on the kernel. Return handlers for components that implements the specified service. Registers the components described by the s with the . The component registrations. The kernel. Associates objects with a component handler, allowing it to use the specified dictionary when resolving dependencies Associates objects with a component handler, allowing it to use the specified dictionary when resolving dependencies Associates objects with a component handler, allowing it to use the specified dictionary when resolving dependencies Associates objects with a component handler, allowing it to use the specified dictionary when resolving dependencies Releases a component instance. This allows the kernel to execute the proper decommission lifecycles on the component instance. Returns true if the specified component was found and could be removed (i.e. no other component depends on it) The component's key Gets the service object of the specified type. A service object of type serviceType. An object that specifies the type of service object to get. Gets the service object of the specified type. A service object of type serviceType. Returns a component instance by the key Returns a component instance by the key Returns the component instance by the service type using dynamic arguments Returns the component instance by the service type using dynamic arguments Returns the component instance by the component key Returns a component instance by the key Component's key Service type The Component instance Returns a component instance by the key Service type Component's key The Component instance Returns the component instance by the service type Returns the component instance by the service type using dynamic arguments Returns the component instance by the service type using dynamic arguments Returns the component instance by the component key using dynamic arguments Returns the component instance by the component key using dynamic arguments Returns all the valid component instances by the service type The service type Returns all the valid component instances by the service type The service type Arguments to resolve the services Returns all the valid component instances by the service type The service type Arguments to resolve the services Returns component instances that implement TService Returns component instances that implement TService Returns component instances that implement TService Graph of components and interactions. Exception throw when a circular dependency is detected Initializes a new instance of the class. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exception. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is . The class name is or is zero (0). Exception threw when a request for a component cannot be satisfied because the component does not exist in the container Initializes a new instance of the class. The name. Initializes a new instance of the class. The name. Exception message. Initializes a new instance of the class. The service. Exception message. Initializes a new instance of the class. The service. Initializes a new instance of the class. The object that holds the serialized object data. The contextual information about the source or destination. Exception threw when there is a problem registering a component Initializes a new instance of the class. The message. Initializes a new instance of the class. The object that holds the serialized object data. The contextual information about the source or destination. Exception threw by Kernel operations that failed for some reason. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exception. Initializes a new instance of the class. The object that holds the serialized object data. The contextual information about the source or destination. Base class for facilities. Unit of extension. A facility should use the extension points offered by the kernel to augment its functionality. The custom initialization for the Facility. It must be overridden. Performs the tasks associated with freeing, releasing, or resetting the facility resources. It can be overriden. Initializes the facility. First it performs the initialization common for all facilities, setting the and the . After it, the Init method is invoked and the custom initilization is perfomed. Terminates the Facility, invokes the method and sets the Kernel to a null reference. Gets the facility configuration. The representing the facility configuration. Gets the where the facility is registered. The . Exception that is thrown when a error occurs during the Event Wiring process Base exception to be used by facilities. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exception. Initializes a new instance of the class. The object that holds the serialized object data. The contextual information about the source or destination. Facility to allow components to dynamically subscribe to events offered by other components. We call the component that offers events publishers and the components that uses them, subscribers. A component that wish to subscribe to an event must use the external configuration adding a node subscribers on the publisher. This node can have multiple entries using the subscriber node. This example shows two simple components: one is the event publisher and the other is the subscriber. The subscription will be done by the facility, using the publisher associated configuration. The Publisher class: public class SimplePublisher { public event PublishEventHandler Event; public void Trigger() { if (Event != null) { Event(this, new EventArgs()); } } } The Subscriber class: public class SimpleListener { private bool _listened; private object _sender; public void OnPublish(object sender, EventArgs e) { _sender = sender; _listened = sender != null; } public bool Listened { get { return _listened; } } public object Sender { get { return _sender; } } } The configuration file: ]]> Overridden. Initializes the facility, subscribing to the , , Kernel events. Checks if the component we're dealing is a publisher. If it is, parses the configuration (the subscribers node) getting the event wiring info. The component model. Invalid and/or a error in the configuration Checks if the component we're dealing is a publisher. If it is, iterates the subscribers starting them and wiring the events. The component model. The instance representing the component. When the subscriber is not found
or
The handler method isn't found
or
The event isn't found
Represents the information about an event. Initializes a new instance of the class. Name of the event. The name of the handler method. Serves as a hash function for a particular type. A hash code for the current . Determines whether the specified is equal to the current . The to compare with the current . true if the specified is equal to the current ; otherwise, false. Gets the name of the event. The name of the event. Gets the handler method name. The handler. Activates a object connecting to the remote server. Initializes a new instance of the class. The model. The kernel. The oncreation event handler. The ondestruction event handler. Activates a client connecting to the remote server, enforcing the uri and the server activation. Initializes a new instance of the class. The model. The kernel. The oncreation event handler. The ondestruction event handler. Activates a client connecting to the remote server through the . Initializes a new instance of the class. The model. The kernel. The oncreation event handler. The ondestruction event handler. Activates a client activated object. Initializes a new instance of the class. The model. The kernel. The oncreation event handler. The ondestruction event handler. Activates and publishes a server object. Initializes a new instance of the class. The model. The kernel. The oncreation event handler. The ondestruction event handler. Facility to allow the communication with remote kernel, using the .NET Remoting infrastructure. TODO TODO Used for client side (Expand explanation) Used for server side. Holds the local registry Used for client side. Holds a remote proxy to the server registry Performs the tasks associated with freeing, releasing, or resetting the facility resources. It can be overridden. Inspects the model looking for remote component configuration. If found, do the component Remoting configuration. Initializes a new instance of the class. The converter. if set to true is a server. if set to true is a client. The base URI. The remote registry. The local registry. Client components are not created by the container so there's no point collecting constructor dependencies Used in case of generics: This method changes behavior of the facility. Deferred mode should be used when you have single call to and register all your components there. Enabling this mode will optimize the behavior of the facility so that it will wait 'till the end of installation and only after all s were ran it will instantiate and start all the startable components. An exception will be thrown if a startable component can't be instantiated and started. This will help you fail fast and diagnose issues quickly. If you don't want the exception to be thrown and you prefer the component to fail silently, use method instead. It is recommended to use this method over method. This method changes behavior of the facility. Deferred mode should be used when you have single call to and register all your components there. Enabling this mode will optimize the behavior of the facility so that it will wait 'till the end of installation and only after all s were ran it will instantiate and start all the startable components. No exception will be thrown if a startable component can't be instantiated and started. If you'd rather fail fast and diagnose issues quickly, use method instead. It is recommended to use method over this method. For each new component registered, some components in the WaitingDependency state may have became valid, so we check them Request the component instance Assigns the start method for the startable. The start method. Be sure that you first added the to the kernel, before registering this component. Assigns the start method for the startable. Method to use. something like: StartUsingMethod(s => s.Start) Be sure that you first added the to the kernel, before registering this component. Assigns the stop method for the startable. The stop method. Be sure that you first added the to the kernel, before registering this component. Assigns the stop method for the startable. Method to use. something like: StartUsingMethod(s => s.Start) Be sure that you first added the to the kernel, before registering this component. Legacy class from old impl. of the facility. Do not use it. Legacy interceptor for old impl. of the facility. Interceptors might implement this to receive the ComponentModel on behalf of the component where the interceptor is acting. Represents a single component to be resolved via Typed Factory Resolves the component(s) from given kernel. Resolved component(s). Represents a set of components to be resolved via Typed Factory. Uses to resolve the components. Creates new instance of . Collection type to resolve. Must be an array (SomeComponent[]) or IEnumerable{SomeComponent}. Type of the element of the collection will be used as first argument to Additional arguents that will be passed as second argument to Provides automatically generated factories on top of interfaces or delegates that you can use to pull components out of the container without ever referencing it explicitly. Marks the component as typed factory. Only interfaces are legal to use as typed factories. Methods with out parameters are not allowed. When registering component as typed factory no implementation should be provided (in case there is any it will be ignored). Typed factories rely on set internally, so users should not set interceptor selectors explicitly; otherwise the factory will not function correctly. Marks the component as typed factory. Only interfaces are legal to use as typed factories. Methods with out parameters are not allowed. When registering component as typed factory no implementation should be provided (in case there is any it will be ignored). Typed factories rely on set internally, so users should not set interceptor selectors explicitly; otherwise the factory will not function correctly. Redirects resolution to the main resolver, and if not found uses the parent handler. Initializes a new instance of the class. The parent handler. The child resolver. Summary description for DefaultGenericHandler. TODO: Consider refactoring AbstractHandler moving lifestylemanager creation to DefaultHandler Initializes a new instance of the class. Clone some of the parent componentmodel properties to the generic subhandler. The following properties are copied: The The the subhandler Summary description for DefaultHandlerFactory. Extension point to allow the developer to use his implementation of Summary description for HandlerException. Initializes a new instance of the class. The message. Initializes a new instance of the class. The object that holds the serialized object data. The contextual information about the source or destination. Possible states for a IHandler instance The component can be requested The component can not be requested as it still depending on a external dependency not yet available Represents a delegate which holds basic information about a component. Key which identifies the component handler that holds this component and is capable of creating an instance of it. Represents a delegate which holds basic information about a component and its instance. Component meta information Component instance Represents a delegate which holds the information about the component Represents a delegate which holds a handler handler that holds a component and is capable of creating an instance of it. Represents a delegate which holds dependency resolving information. Abstract representation of a vertex. The nodes that depends on this node The nodes that this node depends The node has not been visited yet This node is in the process of being visited This now was visited Represents a collection of objects which are guaranteed to be unique and holds a color for them Holds a timestamp (integer) for a given item Summary description for DisposalConcern. Summary description for InitializationConcern. Lifetime concern that works for components that don't have their actual type determined upfront Summary description for SupportInitializeConcern. Only called for components that belongs to a pool when the component comes back to the pool. Implementors should perform any initialization/clean up. Interface for components that wish to be started by the container Starts this instance. Stops this instance. Summary description for PerThreadLifestyleManager. Implements a Poolable Lifestyle Manager. Pool implementation contract. Implementors should return a component instance. Implementors should release the instance or put it on the pool Initializes the pool to a initial size by requesting n components and then releasing them. Summary description for SingletonLifestyleManager. Summary description for TransientLifestyleManager. Summary description for DefaultComponentModelBuilder. Implementors must construct a populated instance of ComponentModel by inspecting the component and|or the configuration. Constructs a new ComponentModel by invoking the registered contributors. "To give or supply in common with others; give to a common fund or for a common purpose". The contributor should inspect the component, or even the configuration associated with the component, to add or change information in the model that can be used later. Removes the specified contributor Initializes a new instance of the class. The kernel. Constructs a new ComponentModel by invoking the registered contributors. "To give or supply in common with others; give to a common fund or for a common purpose". The contributor should inspect the component, or even the configuration associated with the component, to add or change information in the model that can be used later. Removes the specified contributor Initializes the default contributors. Gets the contributors. The contributors. Inspects the component configuration and the type looking for a definition of component activator type. The configuration preceeds whatever is defined in the component. This inspector is not guarantee to always set up an component activator type. If nothing could be found it wont touch the model. In this case is up to the kernel to establish a default component activator for components. Searches for the component activator in the configuration and, if unsuccessful look for the component activator attribute in the implementation type. The kernel instance The model instance Reads the attribute "componentActivatorType" associated with the component configuration and verifies it implements the interface. If the type does not implement the proper interface Check if the type expose one of the component activator attributes defined in Castle.Core namespace. Validates that the provide type implements IComponentActivator The custom component activator. Inspects the component configuration and type looking for information that can influence the generation of a proxy for that component. We specifically look for useSingleInterfaceProxy and marshalByRefProxy on the component configuration or the attribute. Searches for proxy behavior in the configuration and, if unsuccessful look for the attribute in the implementation type. Reads the proxy behavior associated with the component configuration/type and applies it to the model. If the conversion fails Returns a instance if the type uses the attribute. Otherwise returns null. Uses the ConfigurationStore registered in the kernel to obtain an associated with the component. Queries the kernel's ConfigurationStore for a configuration associated with the component name. Check for a node 'parameters' within the component configuration. For each child it, a ParameterModel is created and added to ComponentModel's Parameters collection Inspect the configuration associated with the component and populates the parameter model collection accordingly This implementation of collects all available constructors and populates them in the model as candidates. The Kernel will pick up one of the candidates according to a heuristic. Only to hold internal constants and get rid of magic numbers and hardcode names. Inspect the component for InterceptorAttribute and the configuration for the interceptors node Inspects the type looking for interfaces that constitutes lifecycle interfaces, defined in the Castle.Model namespace. Checks if the type implements and or interfaces. Inspects the component configuration and the type looking for a definition of lifestyle type. The configuration preceeds whatever is defined in the component. This inspector is not guarantee to always set up an lifestyle type. If nothing could be found it wont touch the model. In this case is up to the kernel to establish a default lifestyle for components. Searches for the lifestyle in the configuration and, if unsuccessful look for the lifestyle attribute in the implementation type. Reads the attribute "lifestyle" associated with the component configuration and tries to convert to enum type. Check if the type expose one of the lifestyle attributes defined in Castle.Model namespace. Base for inspectors that want configuration associated with methods. For each child a is created and added to ComponentModel's methods collection Implementors should override the return the name of the node to be inspected. For example: ]]> This implementation of collects all potential writable public properties exposed by the component implementation and populates the model with them. The Kernel might be able to set some of these properties when the component is requested. Initializes a new instance of the class. Adds the properties as optional dependencies of this component. Represents the collection of information and meta information collected about a component. Extended properties Dependencies the kernel must resolve All available constructors All potential properties that can be setted by the kernel Steps of lifecycle External parameters Interceptors associated /// Custom dependencies/// Constructs a ComponentModel Requires the selected property dependencies. The property selector. Requires the property dependencies of type . The dependency type. Sets or returns the component key Gets or sets the service exposed. The service. Gets or sets the component implementation. The implementation. Gets or sets a value indicating whether the component requires generic arguments. true if generic arguments are required; otherwise, false. Gets or sets the extended properties. The extended properties. Gets the constructors candidates. The constructors. Gets the properties set. The properties. Gets or sets the configuration. The configuration. Gets the lifecycle steps. The lifecycle steps. Gets or sets the lifestyle type. The type of the lifestyle. Gets or sets the strategy for inspecting public properties on the components Gets or sets the custom lifestyle. The custom lifestyle. Gets or sets the custom component activator. The custom component activator. Gets the interceptors. The interceptors. Gets the parameter collection. The parameters. Dependencies are kept within constructors and properties. Others dependencies must be registered here, so the kernel (as a matter of fact the handler) can check them Gets the custom dependencies. The custom dependencies. Represents a constructor of the component that the container can use to initialize it properly. Initializes a new instance of the class. The constructor info. The dependencies. Gets the ConstructorInfo (from reflection). The constructor. Gets the dependencies this constructor candidate exposes. The dependencies. Collection of Gets the fewer arguments candidate. The fewer arguments candidate. Collection of . Represents an reference to a Interceptor component. Represents obtained just in time object. Resolves object referenced by this reference, optionally using provided . If object is resolved from the kernel, the should be used to guard against against cyclic dependencies. If the reference introduces dependency on a component, should return for that dependency, otherwise null. Initializes a new instance of the class. The component key. Initializes a new instance of the class. Type of the service. Gets an for the component key. The component key. The Gets an for the service. The service. The Gets an for the service. The service type. The Collection of Adds the specified interceptor as the first. The interceptor. Adds the interceptor to the end of the interceptors list if it does not exist already. The interceptor reference. Adds the specified interceptor as the last. The interceptor. Inserts the specified interceptor at the specified index. The index. The interceptor. Adds the specified item. The interceptor. Returns an enumerator that can iterate through a collection. An that can be used to iterate through the collection. Gets a value indicating whether this instance has interceptors. true if this instance has interceptors; otherwise, false. Gets the number of elements contained in the . Represents a collection of ordered lifecycle concerns. Returns all concerns for the commission phase Returns all concerns for the decommission phase Gets a value indicating whether this instance has commission steps. true if this instance has commission steps; otherwise, false. Gets a value indicating whether this instance has decommission steps. true if this instance has decommission steps; otherwise, false. Represents meta information associated with a method (not yet defined) Initializes a new instance of the class. The config node. Gets the config node. The config node. Collection of Gets the method info2 model. The method info2 model. Represents a parameter. Usually the parameter comes from the external world, ie, an external configuration. Initializes a new instance of the class. The name. The value. Initializes a new instance of the class. The name. The value. Gets the name. The name. Gets the value. The value. Gets the config value. The config value. Collection of Adds the specified name. The name. The value. Adds the specified name. The name. The config node. Determines whether this collection contains the specified key. The key. true if yes; otherwise, false. Adds the specified key. Not implemented The key. The value. Clears this instance. Not implemented Removes the specified key. The key. Not implemented Copy the content to the specified array target array target index Not implemented Returns an enumerator that can iterate through a collection. An that can be used to iterate through the collection. Gets the keys. The keys. Not implemented Gets the values. The values. Not implemented Gets a value indicating whether this instance is read only. true if this instance is read only; otherwise, false. Gets a value indicating whether this instance is fixed size. true if this instance is fixed size; otherwise, false. Gets the with the specified key. Gets the count. The count. Gets the sync root. The sync root. Gets a value indicating whether this instance is synchronized. true if this instance is synchronized; otherwise, false. Represents a property and the respective dependency. Initializes a new instance of the class. The property info. The dependency. Gets the property. The property. Gets the dependency. The dependency. Collection of Finds a PropertySet the by PropertyInfo. The info. Reference to component obtained from a container. Select the appropriate interceptors based on the application specific business logic Determine whatever the specified has interceptors. The selector should only return true from this method if it has determined that is a model that it would likely add interceptors to. The model Whatever this selector is likely to add interceptors to the specified model Select the appropriate interceptor references. The interceptor references aren't necessarily registered in the model.Intereceptors The model to select the interceptors for The interceptors selected by previous selectors in the pipeline or if this is the first interceptor in the pipeline. The interceptor for this model (in the current context) or a null reference If the selector is not interested in modifying the interceptors for this model, it should return and the next selector in line would be executed. If the selector wants no interceptors to be used it can either return null or empty array. However next interceptor in line is free to override this choice. Represents a reference to an existing object. Defines the contract used by the kernel to obtain proxies for components. The implementor must return a proxied instance that dispatch the invocation to the registered interceptors in the model Implementors must create a proxy based on the information exposed by ComponentModel The kernel instance The component model The component instance to be proxy (only required in some cases) array of parameters to the constructor (if any) The creation context proxy instance Implementor should check the component model and determine if the caller must pass on the component instance to the proxy The kernel instance The component model true if an instance must be passed to Add the selector to the list of selectors that can affect interceptor's decisions in the container. Determines whatever we need to create a proxy for this model This is a placeholder implementation of . The decision to supply no implementation for is supported by the fact that the MicroKernel should be a thin assembly with the minimal set of features, although extensible. Providing the support for this interface would obligate the user to import another assembly, even if the large majority of simple cases, no use use of interceptors will take place. If you want to use however, see the Windsor container. Holds the keys used by the proxy factories. Key used to supply custom proxy options. Represents options to configure proxies. Initializes a new instance of the class. Adds the additional interfaces to proxy. The interfaces. Adds the additional mix ins to integrate. The mix ins. Adds the additional mix in to integrate. The mix in. Equals the specified obj. The obj. true if equal. Gets the hash code. Gets the additional interfaces to proxy. The interfaces. Determines if the proxied component can change targets. Determines if the interface proxied component should inherit from Gets or sets the proxy hook. Gets the mix ins to integrate. The interfaces. Determines if the proxied component uses a target. Gets or sets the interceptor selector. Determines if the proxied component should only include the service interface. Helper support for proxy configuration. Obtains the associated with the . The component model. true if the options should be created if not present. The associated proxy options for the component model. Constructs the descriptor with name and value. The attribute name. The attribute value. Constructs the descriptor with name. The component. The attribute name. Builds the with value. The attribute value. The Factory for creating objects. Creates a component registration for the Type of the service. The component registration. Creates a component registration for the Types of the service. The component registration.B Creates a component registration for the Types of the service. The component registration.B Creates a component registration for the service type. The service type. The component registration. Create a component registration for an existing The component model. The component registration. Determines if the component is a Castle component, that is - if it has a . true if the service is a Castle Component. This method is usually used as argument for method. Creates a predicate to check if a component is in a namespace. The namespace. true if the component type is in the namespace. Creates a predicate to check if a component is in a namespace. The namespace. If set to true, will also include types from subnamespaces. true if the component type is in the namespace. Creates a predicate to check if a component shares a namespace with another. The component type to test namespace against. true if the component is in the same namespace. Creates a predicate to check if a component shares a namespace with another. The component type to test namespace against. If set to true, will also include types from subnamespaces. true if the component is in the same namespace. Creates a predicate to check if a component shares a namespace with another. The component type to test namespace against. true if the component is in the same namespace. Creates a predicate to check if a component shares a namespace with another. The component type to test namespace against. If set to true, will also include types from subnamespaces. true if the component is in the same namespace. Determines if the component service is already registered. The kernel. The component model. true if the service is already registered. Creates a component registration for the service types. The primary service type. The forwarded type. The component registration. Creates a component registration for the service types. The primary service type. The first forwarded type. The second forwarded type. The component registration. Creates a component registration for the service types. The primary service type. The first forwarded type. The second forwarded type. The third forwarded type. The component registration. Creates a component registration for the service types. The primary service type. The first forwarded type. The second forwarded type. The third forwarded type. The fourth forwarded type. The component registration. Inserts a new named argument with given key. If an argument for this name already exists, it will be overwritten. Inserts a new typed argument with given type. If an argument for this type already exists, it will be overwritten. Inserts a new typed argument with given type. If an argument for this type already exists, it will be overwritten. Inserts a set of typed arguments. Property names of the anonymous type will be used as key. Inserts a set of typed arguments. Actual type of the arguments will be used as key. Delegate to filter component registration. The kernel. The component model. true if accepted. Registration for a single type as a component with the kernel. You can create a new registration with the factory. The service type The contract for all registrations with the kernel. Performs the registration in the . The kernel. Initializes a new instance of the class. Initializes a new instance of the class with an existing . Marks the components with one or more actors. The component actors. Set a custom which creates and destroys the component. Adds the attribute descriptor. The key. The value. Adds the descriptor. The descriptor. Creates an attribute descriptor. The attribute key. Apply more complex configuration to this component registration. The config nodes. Apply more complex configuration to this component registration. The configuration . Obsolete, use instead. The dependencies. Obsolete, use instead. The dependencies. Obsolete, use instead. The dependencies. Specify custom dependencies using or . You can pass s to specify the components this component should be resolved with. The dependencies. Uses a dictionary of key/value pairs, to specify custom dependencies. Use to specify the components this component should be resolved with. The dependencies. Uses an (anonymous) object as a dictionary, to specify custom dependencies. Use to specify the components this component should be resolved with. The dependencies. Allows custom dependencies to by defined dyncamically. The delegate used for providing dynamic parameters. Allows custom dependencies to by defined dynamically with releasing capability. The delegate used for providing dynamic parameters. Allows custom dependencies to by defined dynamically with releasing capability. The delegate used for providing dynamic parameters. Use when resolving components from in order to detect cycles. Sets for this component. The extended properties. Sets for this component. The extendend properties as key/value pairs. Registers the service types on behalf of this component. The types to forward. Registers the service types on behalf of this component. The forwarded type. The component registration. Registers the service types on behalf of this component. The first forwarded type. The second forwarded type. The component registration. Registers the service types on behalf of this component. The first forwarded type. The second forwarded type. The third forwarded type. The component registration. Registers the service types on behalf of this component. The first forwarded type. The second forwarded type. The third forwarded type. The fourth forwarded type. The component registration. Registers the service types on behalf of this component. The types to forward. Assigns a conditional predication which must be satisfied. The component will only be registered into the kernel if this predicate is satisfied (or not assigned at all). The predicate to satisfy. Sets the concrete type that implements the service to . If not set, the will be used as the implementation for this component. The type that is the implementation for the service. Sets the concrete type that implements the service to . If not set, the will be used as the implementation for this component. The type that is the implementation for the service. Assigns an existing instance as the component for this registration. The component instance. Set the interceptors for this component. The interceptors. Set the interceptors for this component. The interceptors. Set the interceptor for this component. Set the interceptor for this component. Set the interceptor for this component. Change the name of this registration. This will be the key for the component in the kernel. If not set, the of the will be used as the key to register the component. The name of this registration. Stores a set of which will be invoked when the component is created and before it's returned from the container. A set of actions to be executed right after the component is created and before it's returned from the container. With the overwrite. Set configuration parameters with string or values. The parameters. Sets the interceptor selector for this component. Sets the interceptor selector for this component. Override (some of) the services that this component needs. Use to create an override. Each key represents the service dependency of this component, for example the name of a constructor argument or a property. The corresponding value is the key of an other component registered to the kernel, and is used to resolve the dependency. To specify dependencies which are not services, use The service overrides. Override (some of) the services that this component needs, using a dictionary. Each key represents the service dependency of this component, for example the name of a constructor argument or a property. The corresponding value is the key of an other component registered to the kernel, and is used to resolve the dependency. To specify dependencies which are not services, use The service overrides. Override (some of) the services that this component needs, using an (anonymous) object as a dictionary. Each key represents the service dependency of this component, for example the name of a constructor argument or a property. The corresponding value is the key of an other component registered to the kernel, and is used to resolve the dependency. To specify dependencies which are not services, use The service overrides. Assigns a conditional predication which must not be satisfied. The component will only be registered into the kernel if this predicate is not satisfied (or not assigned at all). The predicate not to satisfy. Uses a factory to instantiate the component Factory type. This factory has to be registered in the kernel. Implementation type. Factory invocation Uses a factory method to instantiate the component. Implementation type Factory method Uses a factory method to instantiate the component. Implementation type Factory method Uses a factory method to instantiate the component. Implementation type Factory method Uses a factory method to instantiate the component. Implementation type Factory method Registers this component with the . The kernel. Gets the forwarded service types on behalf of this component. Add more types to forward using . The types of the forwarded services. The concrete type that implements the service. To set the implementation, use . The implementation of the service. Set the lifestyle of this component. For example singleton and transient (also known as 'factory'). The with lifestyle. The name of the component. Will become the key for the component in the kernel. To set the name, use . If not set, the of the will be used as the key to register the component. The name. Set proxy for this component. The proxy. The type of the service, the same as . This is the first type passed to . The type of the service. A non-generic . You can create a new registration with the factory. Represents a configuration child. Applies the configuration node. The configuration. Represents a configuration attribute. Applies the configuration node. The configuration. Create a with name. The attribute name. The new Represents a named attribute. Builds the with name/value. The attribute value. The new Builds the with name/value. The attribute value. The new Represents a configuration child. Create a with name. The child name. The new Represents a named child. Builds the with name/value. The child value. The new Builds the with name/value. The child value. The new Builds the with name/config. The child configuration. The new Builds the with name/config. The child nodes. The new Applies the configuration node. The configuration. Represents a simple child node. Applies the configuration node. The configuration. Represents a complex child node. Applies the configuration node. The configuration. Represents a compound child node. Applies the configuration node. The configuration. The contract to install components in the container. Performs the installation in the . The container. The configuration store. Adds the actions to ExtendedProperties. Sets the lifestyle to the specified . The type. Assign a custom lifestyle type, that implements . Type of the custom lifestyle. Assign a custom lifestyle type, that implements . The type of the custom lifestyle Represents a configuration parameter. Create a with key. The parameter key. The new Gets the parameter key. Gets the parameter value. Gets the parameter configuration. Represents a parameter key. Builds the with key/value. The parameter value. The new Builds the with key/config. The parameter configuration. The new The parameter key name. Represents a key/value pair. Create a with key. The property key. The new Create a with key. The property key. The new Create a with key. The property key. The new Gets the property key. Gets the property value. Represents a property key. Builds the with key/value. The property value. The new Builds a service override using other component registered with given as value for dependency with given . Builds a service override using other component registered with given and no explicit name, as value for dependency with given . Builds a service override using other component registered with given and no explicit name, as value for dependency with given . The property key key. Represents a service override. Creates a with key. The service override key. The new Creates a with key. The service override key. The new Creates a with key. The service override key. The new Gets the optional value type specifier. Represents a service override key. Builds the with key/value. The service override value. The new Builds the with key/values. The service override values. The new Builds the with key/values. The service override values. The new The value type. Builds the with key/values. The service override values. The new Builds the with key/values. The service override values. The new The value type. Describes a set of components to register in the kernel. Describes all the types based on basedOn. The base type. Describes all the types based on type T. The base type. Describes any types that are supplied. Prepares to register types from an assembly. The assembly name. The corresponding Prepares to register types from an assembly. The assembly. The corresponding Prepares to register types from an assembly containing the type. The type belonging to the assembly. The corresponding Prepares to register types from an assembly containing the type. The type belonging to the assembly. The corresponding Prepares to register types from the assembly containing the code invoking this method. The corresponding Prepares to register types from assemblies found in a given directory that meet additional optional restrictions. Prepares to register types from a list of types. The list of types. The corresponding Prepares to register types from a list of types. The list of types. The corresponding Prepares to register types from a list of types. The list of types. The corresponding Describes a related group of components to register in the kernel. Prepares to register types from an assembly. The assembly name. The corresponding Prepares to register types from an assembly. The assembly. The corresponding Prepares to register types from a list of types. The list of types. The corresponding Prepares to register types from a list of types. The list of types. The corresponding Prepares to register types from a list of types. The list of types. The corresponding Describes a configuration. Initializes a new instance of the ConfigureDescriptor. The The configuration action. Initializes a new instance of the ConfigureDescriptor. The The base type to match. The configuration action. Allows customized configurations of each matching type. The configuration action. Allows customized configurations of each matching type. The configuration action. Allows customized configurations of each matching type that is assignable to . The type assignable from. The configuration action. Allows customized configurations of each matching type that is assignable to . The type assignable from. The configuration action. Performs the component configuration. The component registration. Selects a set of types from an assembly. Describes the source of types to register. Allows a type to be registered multiple times. Returns the descriptor for accepting a type. The base type. The descriptor for the type. Returns the descriptor for accepting a type. The base type. The descriptor for the type. Returns the descriptor for accepting any type from given solutions. Returns the descriptor for accepting a type based on a condition. The accepting condition. The descriptor for the type. Selects an existing set of types to register. Describes how to select a types service. Uses the base type matched on. Uses the type itself. Uses all interfaces implemented by the type (or its base types) as well as their base interfaces. Uses all interfaces that have names matched by implementation type name. Matches Foo to IFoo, SuperFooExtended to IFoo and IFooExtended etc Uses the first interface of a type. This method has non-deterministic behavior when type implements more than one interface! Uses to lookup the sub interface. For example: if you have IService and IProductService : ISomeInterface, IService, ISomeOtherInterface. When you call FromInterface(typeof(IService)) then IProductService will be used. Useful when you want to register _all_ your services and but not want to specify all of them. Uses base type to lookup the sub interface. Assigns a custom service selection strategy. Assigns the supplied service types. This is a workaround for a CLR bug in which GetInterfaces() returns interfaces with no implementations. Type of the service. Delegate for custom registration configuration. The component registration. Not used. Describes how to register a group of related types. Initializes a new instance of the BasedOnDescriptor. Allows a type to be registered multiple times. Returns the descriptor for accepting a new type. The base type. The descriptor for the type. Returns the descriptor for accepting a new type. The base type. The descriptor for the type. Allows customized configurations of each matching type. The configuration action. Allows customized configurations of each matching type. The configuration action. Allows customized configurations of each matching type that is assignable to . The type assignable from. The configuration action. Allows customized configurations of each matching type that is assignable to . The type assignable from. The configuration action. Assigns a conditional predication which must be satisfied. The predicate to satisfy. Assigns a conditional predication which must not be satisfied. The predicate not to satisify. Returns the descriptor for accepting a type based on a condition. The accepting condition. The descriptor for the type. Gets the type all types must be based on. Gets the service descriptor. Policy managing lifetime of components, and in particular their release process. Only tracks components that have decommission steps registered or have pooled lifestyle. No tracking of component instances are made. Default implementation for . This implementation is quite simple, but still should be useful for 99% of situations. Implementors should use a strategy to obtain valid references to properties and/or services requested in the dependency model. This method is called with a delegate for firing the IKernelEvents.DependencyResolving event. kernel The delegate used to fire the event Registers a sub resolver instance The subresolver instance Unregisters a sub resolver instance previously registered The subresolver instance Initializes this instance with the specified dependency delegate. kernel The dependency delegate. Registers a sub resolver instance The subresolver instance Unregisters a sub resolver instance previously registered The subresolver instance Returns true if the resolver is able to satisfy the specified dependency. Creation context, which is a resolver itself Parent resolver Model of the component that is requesting the dependency The dependency model true if the dependency can be satisfied Try to resolve the dependency by checking the parameters in the model or checking the Kernel for the requested service. The dependency resolver has the following precedence order: The dependency is checked within the The dependency is checked within the instance for the component The dependency is checked within the registered s Finally the resolver tries the normal flow which is using the configuration or other component to satisfy the dependency Creation context, which is a resolver itself Parent resolver Model of the component that is requesting the dependency The dependency model The dependency resolved value or null Extracts the component name from the a ref strings which is ${something} This method rebuild the context for the parameter type. Naive implementation. Summary description for DependencyResolverException. Initializes a new instance of the class. The message. The inner exception. Initializes a new instance of the class. The message. Initializes a new instance of the class. The object that holds the serialized object data. The contextual information about the source or destination. Handle dependencies of services in the format of typed arrays. This is a complimentary implementation that is capable of satisfying dependencies of services as typed arrays. Note that it will take precedence over service override for arrays defined on the configuration. In order to install the resolver: var kernel = new DefaultKernel(); kernel.Resolver.AddSubResolver(new ArrayResolver(kernel)); To use it, assuming that IService is on the container: public class Component { public Component(IService[] services) { } } More generic alternative to and . It supports arrays as well as any generic interface type assignable from arrays. The collection instance that is provided is read only, even for interfaces like Handle dependencies of services in the format of generic IList. This is a complimentary implementation that is capable of satisfying dependencies of services generic IList. Note that it will take precedence over service override for lists defined on the configuration. In order to install the resolver: var kernel = new DefaultKernel(); kernel.Resolver.AddSubResolver(new ListResolver(kernel)); To use it, assuming that IService is on the container: public class Component { public Component(IList<IService> services) { } } A subsystem is used by the MicroKernel to deal with a specific concern. Initializes the subsystem Should perform the termination of the subsystem instance. This implementation of does not try to obtain an external configuration by any means. Its only purpose is to serve as a base class for subclasses that might obtain the configuration node from anywhere. The contract used by the kernel to obtain external configuration for the components and facilities. Associates a configuration node with a facility key item key Configuration node Associates a configuration node with a component key item key Configuration node Associates a configuration node with a bootstrap component key item key Configuration node Adds the child container configuration. The container's name. The config. Returns the configuration node associated with the specified child container key. Should return null if no association exists. item key Returns the configuration node associated with the specified facility key. Should return null if no association exists. item key Returns the configuration node associated with the specified component key. Should return null if no association exists. item key Returns the configuration node associated with the specified component key. Should return null if no association exists. item key Returns all configuration nodes for facilities Returns all configuration nodes for components Returns all configuration nodes for installers Returns all configuration nodes for bootstrap components Gets the child containers configuration nodes. Initializes a new instance of the class. Associates a configuration node with a facility key item key Configuration node Associates a configuration node with a component key item key Configuration node Associates a configuration node with a bootstrap component key Adds the child container configuration. The key. The config. Returns the configuration node associated with the specified facility key. Should return null if no association exists. item key Returns the configuration node associated with the specified child container key. Should return null if no association exists. item key Returns the configuration node associated with the specified component key. Should return null if no association exists. item key Returns the configuration node associated with the specified component key. Should return null if no association exists. Returns all configuration nodes for facilities Returns all configuration nodes for bootstrap components Returns all configuration nodes for child containers Returns all configuration nodes for components Base implementation of Implements a conversion logic to a type of a set of types. Returns true if this instance of ITypeConverter is able to handle the specified type. Returns true if this instance of ITypeConverter is able to handle the specified type with the specified configuration Should perform the conversion from the string representation specified to the type specified. Should perform the conversion from the configuration node specified to the type specified. Returns true if this instance of ITypeConverter is able to handle the specified type with the specified configuration The default behavior is to just pass it to the normal CanHadnleType peeking into the configuration is used for some advanced functionality Summary description for ConverterException. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exception. Initializes a new instance of the class. The object that holds the serialized object data. The contextual information about the source or destination. Looks for a on the type to be converted. If found, the TypeConverter defined by the attribute is used to perform the conversion. Marker interface that signals that a converter depends on IKernel to be able to perform the conversion. Attempts to utilize an existing for conversion Creates the target type instance. The type. The configuration. Chooses the first non default constructor. Throws an exception if more than one non default constructor is found The chosen constructor, or null if none was found Converts the constructor parameters. The constructor. The configuration. Converts the property values. The instance. The type. The configuration. Finds the child (case insensitive). The config. The name. Gets the conversion manager. The conversion manager. Converts a string representation to an enum value Initializes a new instance of the class. This interface is needed because we want to isolate ourself from the generic parameters, so we can work type safe inside the implementations, and still call from non generic types outside. Implements all standard conversions. Convert a type name to a Type instance. Declares a type as being convertible by a and optionally defines the converter to be used Defines the to be used to convert the type Defines the to be used to convert the type Composition of all available conversion managers Establish a composition interface and a subsystem. Implementors should delegate the conversion to a instance of a type converter. Register a type converter instance. Method finds the next biggest node It assumes Add puts lesser nodes on the right Node's left Node's right Node's parent DA Linked List Creates a ComponentName using a name pattern like "service:key=value,key2=value2" Complete name Creates a ComponentName with specified service and properties. Service name Property list. Serialization constructor. Parses the full name extracting the service and properties. Full name. Sets up the service. Can be empty but can't be null. Parses and validate a properties list string like "key=value,key2=value2" and so on. Property list. Validates a properties IDictionary. Property list. Default implementation. Keeps services map as a simple hash table. Keeps key map as a list dictionary to maintain order. Does not support a query string. Contract for SubSystem that wishes to keep and coordinate component registration. Register a new component resolver that can take part in the decision making about which handler to resolve Returns true if there is a component registered for the specified key Returns true if there is a component registered for the specified service Return s where components are compatible with the specified service. Returns the associated with the specified key. Returns the associated with the specified service. Returns the associated with the specified key with the service type. It is expected that this will be used mainly to resolve a generic service by its key. Returns an array of that satisfies the specified query. Returns an array of associated with the specified service. Returns all registered. List of handler by key List of handler by service Implementors should register the key and service pointing to the specified handler Unregister the handler by the given key Unregister the handler by the given service Returns the number of components registered. Associates a with the specified service Associates a with the specified key Map(String, IHandler) to map component keys to Items in this dictionary are sorted in insertion order. Map(Type, IHandler) to map a service to . If there is more than a single service of the type, only the first registered services is stored in this dictionary. It serve as a fast lookup for the common case of having a single handler for a type. Initializes a new instance of the class. Implementors of this interface allow to extend the way the container perform component resolution based on some application specific business logic. This is the sibling interface to . This is dealing strictly with root components, while the is dealing with dependent components. Whatever the selector has an opinion about resolving a component with the specified service and key. The service key - can be null The service interface that we want to resolve Select the appropriate handler from the list of defined handlers. The returned handler should be a member from the array. The service key - can be null The service interface that we want to resolve The defined handlers The selected handler, or null When requesting a component by service, KeySearchNamingSubSystem first determines if more than one component has been registered for that service. If not, Default resolution occurs. If so, all of the registered keys for that service are processed through the provided Predicate to determine which key to use for service resolution. If no Predicate matches, the default resolution occurs. Initializes a new instance of the class. Initializes a new instance of the class. The key predicate. Registers the given handler with the give key. The key. The handler. Unregisters the handler associated with the given key The key. Unregisters the handler associated with the given service The service. Executes the Predicate against all keys for the registered service to determine which component to return. The service. Alternative implementation. Extends the default implementation replacing the key support with a more complete ComponentName. Supports queries. The user must register components using the following construction service:properties Where properties is a list of key value pairs (comma separated). Example: protocol:secure=true,version=1.2 The user can then query for components using the same construction: protocol:secure=true Or to return all: protocol:* Pendent An implementation of a should be able to return instances of for a given resource identifier. Holds the keys used by Kernel to register/request a subsystem. Key used for the configuration store subsystem Key used for the conversion manager Key used for the naming subsystem Key used for the resource subsystem Compares if the reference of two objects are equals. Summary description for ReferenceExpressionUtil. Integrates the to the System.ComponentModel and System.ComponentMode.Design infrastructure. This interface should be implemented by classes that are available in a bigger context, exposing the container to different areas in the same application. For example, in Web application, the (global) HttpApplication subclasses should implement this interface to expose the configured container Custom activator to create the instance on demand. Implementation of . Do not support configuration inheritance. Interpreter of a specific language to describe configuration nodes in a hierarchical manner. Should obtain the contents from the resource, interpret it and populate the accordingly. Gets or sets the name of the environment. The name of the environment. Exposes the reference to which the interpreter is likely to hold Provides common methods for those who wants to implement Should obtain the contents from the resource, interpret it and populate the accordingly. Exposes the reference to which the interpreter is likely to hold Gets or sets the name of the environment. The name of the environment. Reads the configuration from a XmlFile. Sample structure: <configuration> <facilities> <facility id="myfacility"> </facility> </facilities> <components> <component id="component1"> </component> </components> </configuration> Initializes a new instance of the class. Initializes a new instance of the class. The filename. Initializes a new instance of the class. The source. Gets or sets the kernel. The kernel. Initializes a new instance of the class. Name of the environment. Initializes a new instance of the class. Name of the environment. The resource sub system. Processes the element. The element. Processes the element. The element. Make a shallow copy of the nodeList. The nodeList to be copied. Accepts the specified node. Check if node has the same name as the processor and the node.NodeType is in the AcceptNodeTypes List The node. Convert and return child parameter into an XmlElement An exception will be throw in case the child node cannot be converted Parent node Node to be converted child node as XmlElement attributeValue propertyValue Processes the specified node list. The node list. The engine. Processes element attributes. if the attribute is include will append to the element all contents from the file. if the attribute has a property reference the reference will be expanded The element. Properties names can contain a-zA-Z0-9_. i.e. #!{ my_node_name } || #{ my.node.name } spaces are trimmed Processes the string. The node. The value. The context. Accepts the specified node. Check if node has the same name as the processor and the node.NodeType is in the AcceptNodeTypes List NOTE: since the BatchRegistrationFacility already uses an include element we will distinguish between both by looking for the presence of an uri attribute we should revisit this later by using xml-namespaces The node. attributeValue propertyValue Pendent Initializes a new instance of the class. Initializes a new instance of the class. Name of the environment. The resource sub system. Initializes a new instance of the class. Gets the environment information (name). Implementors should use to define their environments and how those affect the configuration. Gets the name of the environment. Installs all the components from the App.Config file. Installs all the component from the xml configuration file. The xml configuration file. Installs all the component from the xml configuration. The xml configuration resource. Delegate to provide environment name. The environment name. Initializes a new instance of the ConfigurationInstaller class. Sets the configuration environment name. The environment name. Set the configuration environment strategy. The environment strategy. Default implementation. Installs the components and facilities based on the information on the configuration store. Perform installation. Target container Configuration store Perform installation. Target container Configuration store Scans the assembly containing specified type for types implementing , instantiates them and returns so that can install them. Scans the assembly containing specified type for types implementing , instantiates using given and returns so that can install them. Scans the assembly containing specified type for types implementing , instantiates them and returns so that can install them. Scans the assembly containing specified type for types implementing , instantiates using given and returns so that can install them. Scans the specified assembly with specified name for types implementing , instantiates them and returns so that can install them. Scans the specified assembly with specified name for types implementing , instantiates using given and returns so that can install them. Scans the assembly with specified name for types implementing , instantiates them and returns so that can install them. Scans the assembly with specified name for types implementing , instantiates using given and returns so that can install them. Scans assembly that contains code calling this method for types implementing , instantiates them and returns so that can install them. Scans assembly that contains code calling this method for types implementing , instantiates using given and returns so that can install them. Scans assemblies in directory specified by for types implementing , instantiates and returns so that can install them. Scans assemblies in directory specified by for types implementing , instantiates using given and returns so that can install them. Helper class used by to filter/order and instantiate implementations Performs custom instantiation of given Default implementation uses public parameterless constructor to create the instance. Performs custom filtering/ordering of given set of types. Set of concrete class types implementing interface. Transformed . Default implementation simply returns types passed into it. The IWindsorContainer interface exposes all the functionality the Windsor implements. Registers a subcontainer. The components exposed by this container will be accessible from subcontainers. Registers a facility within the container. The key by which the gets indexed. The to add to the container. Creates and adds an facility to the container. The facility type. Creates and adds an facility to the container. The facility type. The callback for creation. Creates and adds an facility to the container. The facility type. The callback for creation. Creates and adds an facility to the container. The facility type. Creates and adds an facility to the container. The facility type. The callback for creation. Creates and adds an facility to the container. The facility type. The callback for creation. Gets a child container instance by name. The container's name. The child container instance or null Installs the components provided by the s with the . The component installers. The container. Registers the components provided by the s with the . Create a new registration using .For() or . container.Register(Component.For<IService>().ImplementedBy<DefaultService>()); The component registrations. The container. Releases a component instance Remove a child container Returns a component instance by the key Returns a component instance by the key Returns a component instance by the key Returns a component instance by the service Returns a component instance by the service Returns a component instance by the service Returns a component instance by the service Service type The component instance Returns a component instance by the service Service type The component instance Returns a component instance by the service Service type The component instance Returns a component instance by the key Component's key Service type The Component instance Returns a component instance by the key Service type Component's key The Component instance Returns a component instance by the key Service type Component's key The Component instance Returns a component instance by the key Returns a component instance by the key Resolve all valid components that match this type. The service type Resolve all valid components that match this service the service to match Resolve all valid components that match this service the service to match Arguments to resolve the service Resolve all valid components that match this service the service to match Arguments to resolve the service Resolve all valid components that match this type. The service type Arguments to resolve the service Resolve all valid components that match this type. The service type Arguments to resolve the service Returns the inner instance of the MicroKernel Gets the container's name Only useful when child containers are being used The container's name. Gets or sets the parent container if this instance is a sub container. Obtains the interceptors associated with the component. The kernel instance The component model The creation context interceptors array This implementation of relies on DynamicProxy to expose proxy capabilities. Note that only virtual methods can be intercepted in a concrete class. However, if the component was registered with a service interface, we proxy the interface and the methods don't need to be virtual, Constructs a DefaultProxyFactory Creates the proxy for the supplied component. The kernel. The target. The model. The constructor arguments. The creation context The component proxy. Determines if the component requires a target instance for proxying. The kernel. The model. true if an instance is required. Implementation of which delegates to implementation. Constructs a container without any external configuration reference Constructs a container using the specified implementation. The instance of an implementation. Constructs a container using the specified implementation. The instance of an implementation. Initializes a new instance of the class. The interpreter. The environment info. Initializes a new instance of the class using a xml file to configure it. Equivalent to the use of new WindsorContainer(new XmlInterpreter(xmlFile)) The XML file. Constructs a container using the specified implementation. Rarely used. This constructs sets the Kernel.ProxyFactory property to Proxy.DefaultProxyFactory Kernel instance Installer instance Constructs a container using the specified implementation. Rarely used. This constructs sets the Kernel.ProxyFactory property to Proxy.DefaultProxyFactory Container's name Kernel instance Installer instance Constructs with a given . A instance of an . Constructs a container assigning a parent container before starting the dependency resolution. The instance of an The instance of an implementation Initializes a new instance of the class. The container's name. The parent. The interpreter. Executes Dispose on underlying Gets the service object of the specified type. A service object of type serviceType. An object that specifies the type of service object to get. Gets the service object of the specified type. A service object of type serviceType. Registers a subcontainer. The components exposed by this container will be accessible from subcontainers. Registers a facility within the kernel. Creates and adds an facility to the container. The facility type. Creates and adds an facility to the container. The facility type. The callback for creation. Creates and adds an facility to the container. The facility type. The callback for creation. Creates and adds an facility to the container. The facility type. Creates and adds an facility to the container. The facility type. The callback for creation. Creates and adds an facility to the container. The facility type. The callback for creation. Gets a child container instance by name. The container's name. The child container instance or null Installs the components provided by the s with the . The component installers. The container. Registers the components described by the s with the . The component registrations. The container. Releases a component instance Removes (unregisters) a subcontainer. The components exposed by this container will no longer be accessible to the child container. Returns a component instance by the service Returns a component instance by the service Returns a component instance by the key Returns a component instance by the key Returns a component instance by the service Returns a component instance by the key Returns a component instance by the key Returns a component instance by the key Returns a component instance by the service Returns a component instance by the service Returns a component instance by the key Returns a component instance by the key Returns a component instance by the service Returns a component instance by the key Resolve all valid components that match this type. The service type Resolve all valid components that match this type. The service type Arguments to resolve the service Resolve all valid components that match this type. The service type Arguments to resolve the service Returns the inner instance of the MicroKernel Gets the container's name Only useful when child containers are being used The container's name. Gets or sets the parent container if this instance is a sub container. Implementation of that assumes ownership of the wrapped . If this adapter is disposed, the underlying is diposed as well. Implementation of that does not assume ownership of the wrapped . Constructs an initial ContainerWrapper. The to adapt. Constructs an initial ContainerWrapper. The to adapt. The parent . Adds the specified to the at the end of the list. The to add. Adds the specified to the at the end of the list, and assigns a name to the component. The to add. The unique, case-insensitive name to assign to the component, or null. Removes a component from the . The to remove Gets the service object of the specified type. The type of service. An object implementing service, or null. Adds the specified service to the service container. The type of service to add. The instance of the service to add. Adds the specified service to the service container. The type of service to add. A callback object that is used to create the service. Adds the specified service to the service container, and optionally promotes the service to any parent service containers. The type of service to add. The instance of the service to add. true to promote this request to any parent service containers. Adds the specified service to the service container, and optionally promotes the service to parent service containers. The type of service to add. A callback object that is used to create the service. true to promote this request to any parent service containers. Removes the specified service type from the service container. The type of service to remove. Removes the specified service type from the service container, and optionally promotes the service to parent service containers. The type of service to remove. true to promote this request to any parent service containers. Determines if the service type represents an intrinsic service. The type of service to remove. true if the service type is an intrinsic service. Determines if the specified service type exists in the service container. The type of service to remove. true if the service type exists. Releases the resources used by the component. Releases the resources used by the component. true if disposing. Gets or sets the associated with the . Event that notifies the disposal of the . Gets all the components in the . Gets the adapted Constructs a default ContainerAdapter. Constructs a chained ContainerAdapter. The parent . Constructs an initial ContainerAdapter. The to adapt. Constructs an initial ContainerAdapter. The to adapt. The parent .