Created
April 7, 2018 09:33
-
-
Save NMZivkovic/cf6a298dfe2e2354e0fae06ff9cc37e0 to your computer and use it in GitHub Desktop.
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
var builder = new ContainerBuilder(); | |
builder.RegisterType<Client>(); | |
builder.RegisterInstance(new Service1()) | |
.As<IService1>(); | |
builder.RegisterInstance(new Service2()) | |
.As<IService2>().SingleInstance(); | |
var container = builder.Build(); | |
var client = container.Resolve<Client>(); | |
client.InitiateServiceMethods(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment