Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Castle.MicroKernel.Registration;
using Castle.Windsor;
using Castle.MicroKernel.SubSystems.Configuration;
using System.Web.Mvc;
using CastleDemo.Controllers;
namespace CastleDemo.Installers
public class ControllersInstaller : IWindsorInstaller
public void Install(IWindsorContainer container, IConfigurationStore store)
private ConfigureDelegate ConfigureControllers()
return c => c.LifeStyle.Transient;
private BasedOnDescriptor FindControllers()
return AllTypes.FromThisAssembly()
.If(t => t.Name.EndsWith("Controller"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment