Last active
August 29, 2015 14:13
-
-
Save uhaciogullari/43df96c826d52661b2bd to your computer and use it in GitHub Desktop.
Windsor Installer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DefaultInstaller : IWindsorInstaller | |
{ | |
public void Install(IWindsorContainer container, IConfigurationStore store) | |
{ | |
container.Register(Classes.FromThisAssembly().IncludeNonPublicTypes().Pick().WithServiceAllInterfaces().LifestyleSingleton()); | |
container.Register(Component.For<ILogger>().Instance(new LoggerAdapter(LogManager.GetCurrentClassLogger()))); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WebsiteInstaller : IWindsorInstaller | |
{ | |
public void Install(IWindsorContainer container, IConfigurationStore store) | |
{ | |
container.Register(Classes.FromThisAssembly().BasedOn<IController>().LifestyleTransient()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment