diff --git a/AutoFacSamles/Program.cs b/AutoFacSamles/Program.cs index 8794f76..60ed079 100644 --- a/AutoFacSamles/Program.cs +++ b/AutoFacSamles/Program.cs @@ -70,10 +70,13 @@ namespace AutoFacSamles static void Main(string[] args) { var builder = new ContainerBuilder(); - builder.RegisterType().As(); + //builder.RegisterType().As(); + var log = new ConsoleLog(); + builder.RegisterInstance(log).As(); //val av redan instantierat objekt + builder.RegisterType(); builder.RegisterType() - .UsingConstructor(typeof(Engine)); + .UsingConstructor(typeof(Engine)); //val av contructor IContainer container = builder.Build();