Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created April 7, 2018 09:29
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 NMZivkovic/7da677b77f03df5e394bdb9e2c439fb0 to your computer and use it in GitHub Desktop.
Save NMZivkovic/7da677b77f03df5e394bdb9e2c439fb0 to your computer and use it in GitHub Desktop.
var container = new WindsorContainer();
container.Register(Component.For<Client>());
container.Register(Component.For<IService1>()
.ImplementedBy<Service1>());
container.Register(Component.For<IService2>()
.ImplementedBy<Service2>().LifestyleSingleton());
var client = container.Resolve<Client>();
client.InitiateServiceMethods();
container.Release(client);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment