Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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