Skip to content

Instantly share code, notes, and snippets.

View cardinal252's full-sized avatar

Nathanael Mann cardinal252

View GitHub Profile
@simonproctor
simonproctor / Application
Created July 21, 2013 07:33
Delegate factory example for Autofac. Shows an ordinary factory and a factory returning owned instances.
namespace Demo
{
public class Application
{
private readonly IContainer container;
public Application()
{
ContainerBuilder builder = new ContainerBuilder();
builder.RegisterType<Biscuit>().As<IDependency>().Named<IDependency>("biscuits");