Create a gist now

Instantly share code, notes, and snippets.

WindsorInstaller For Single Action Controllers
public void Install(IWindsorContainer container, IConfigurationStore store)
{
foreach (var type in Assembly.GetExecutingAssembly().GetTypes())
{
if (typeof(IController).IsAssignableFrom(type) && !type.IsAbstract)
container.Register(Component.For(type).ImplementedBy(type).Named(type.FullName.ToLower()).LifeStyle.Transient);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment