Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stoolrossa/5943556 to your computer and use it in GitHub Desktop.
Save stoolrossa/5943556 to your computer and use it in GitHub Desktop.
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using Blog.SoeExample.Service;
using Blog.SoeExample.Repository;
namespace Blog.SoeExample.Installer
{
public class ServiceInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfigurationStore store)
{
container.Register(Component.For<IExampleService>()
.ImplementedBy<ExampleService>()
.LifestyleTransient(),
Component.For<IExampleRepository>()
.ImplementedBy<ExampleRepository>()
.LifestyleTransient());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment