Resolve instance - Autofac

Posted by user137348 on Stack Overflow See other posts from Stack Overflow or by user137348
Published on 2010-04-29T12:12:35Z Indexed on 2010/04/29 12:17 UTC
Read the original article Hit count: 130

Filed under:
|

I'm trying to figure out how to resolve a instance somewhere in the code.

At the application startup I registered a type

static void Main()
{    
    var builder = new ContainerBuilder();
    builder.RegisterType<Foo>().As<IFoo>();
}

Now, how can I resolve an instance somewhere in the code ?

In structure mam there is a static object ObjectFactory.GetInstance<IFoo>()

© Stack Overflow or respective owner

Related posts about .NET

Related posts about autofac