Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created April 7, 2018 09:33
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/ecb2022a7b1380821b8b7970f3f2f5a8 to your computer and use it in GitHub Desktop.
Save NMZivkovic/ecb2022a7b1380821b8b7970f3f2f5a8 to your computer and use it in GitHub Desktop.
var container = new StructureMap.Container(x =>
{
x.For<IService1>().Use<Service1>().Transient();
x.For<IService2>().Use<Service2>().Singleton();
x.For<Client>().Use<Client>();
});
var client = container.GetInstance<Client>();
client.InitiateServiceMethods();
container.Release(client);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment