Skip to content

Bootstrapping example

swmal edited this page Jan 15, 2012 · 2 revisions

Create a container and add some dependencies. var containerBuilder = ContainerBuilder.CreateBuilder(); containerBuilder.Register<ITestInterface1>().ImplementedBy<TestInterfaceImpl>().WithLifetime(Lifetime.Singleton); containerBuilder.Register<ITestInterface2>().ImplementedBy<TestInterface2Impl>(); containerBuilder.Register<ITestInterface3>().ImplementedBy<TestInterface3Impl>(); var container = containerBuilder.Build();

Clone this wiki locally