Skip to content

Instantly share code, notes, and snippets.

@ntr
Created February 26, 2013 18:34
Show Gist options
  • Save ntr/5040887 to your computer and use it in GitHub Desktop.
Save ntr/5040887 to your computer and use it in GitHub Desktop.
public static IContainer ConfigureContainer()
{
var builder = new ContainerBuilder();
builder.RegisterType<Worker>();
builder.RegisterModule(new TypedLoggersInjector(new LogFactory()));
return builder.Build();
}
public static void TestInjection()
{
var container = ConfigureContainer();
var worker = container.Resolve<Worker>();
worker.Start();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment