Skip to content

Instantly share code, notes, and snippets.

@jakcharlton
Created July 11, 2011 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakcharlton/1075176 to your computer and use it in GitHub Desktop.
Save jakcharlton/1075176 to your computer and use it in GitHub Desktop.
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