Skip to content

Instantly share code, notes, and snippets.

@hvitorino
Created October 17, 2011 20:36
Show Gist options
  • Save hvitorino/1293725 to your computer and use it in GitHub Desktop.
Save hvitorino/1293725 to your computer and use it in GitHub Desktop.
controller installer - windsor
public class ControllersInstaller : IWindsorInstaller
{
#region IWindsorInstaller Members
public void Install(IWindsorContainer container, IConfigurationStore store)
{
container.Register(FindControllers().Configure(ConfigureControllers()));
}
#endregion
private ConfigureDelegate ConfigureControllers()
{
return c => c.LifeStyle.Transient;
}
private BasedOnDescriptor FindControllers()
{
return AllTypes.FromThisAssembly()
.BasedOn<Controller>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment