public
Created

WindsorInstaller For Single Action Controllers

  • Download Gist
installer.cs
C#
1 2 3 4 5 6 7 8
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);
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.