This method basically does the resolving of object from the container. as it is a DI container so if the constructor of your object is having the following signature

public Class1(Class2 cls)

And again Class2's constructor is having the following signature

public Class2(IClassX cls)

and say your IClassX is registered as following


Now if you do a resolve as

var cls1= container.Resolve<Class1>();
var cls1= container.Resolve(typeof(Class1));

This will automatically create the required instance of Class2 for class one and you will get the instance of Class1. Just in the same way of a normal DI container

Last edited Jun 22, 2011 at 9:16 PM by tikluganguly, version 2


No comments yet.