Overview of Castle Windsor extension points
masterCastle Windsor is designed to be extended rather than providing every capability out of the box. It exposes several layers of extension points that allow you to modify or augment the container's behavior. These range from low-level subsystems to high-level facilities and lifecycle management.
Common extension points include:
- Facilities: The primary extension point, often encompassing multiple other extension points.
- Lifestyle Managers: Control when instances are created, reused, or disposed.
- Lifecycle Concerns: Execute logic during component creation or decommissioning.
- Handler Selectors: Custom logic for selecting components (useful for multi-tenant apps).
- Component Activators: Control the actual instantiation process of components.
- Resolvers: Override the logic used to resolve components.
- ComponentModel Construction Contributors: Inspect or modify the
ComponentModelduring registration. - Lazy Component Loaders: Enable just-in-time registration (e.g., pulling from MEF or WCF).
- Model Interceptors Selectors: Dynamically select interceptors for specific components.
- Release Policy: Handle how components are tracked and released.
- SubSystems: The innermost extension point, rarely swapped.
- Container Events: Subscribe to events occurring within the container.