Registration

//Only named registrations are currently supported
Container.Register(new Type[] { typeof(IDependency), typeof (Implementation) }, "ImplementationName");




Resolution
//Injecting a parameterless constructor
var parameterlessInstance = Container.Resolve(typeof(IDependency), "ImplementationName");


//Injecting a constructor with parameters 
var parametersInstance = Container.Resolve(typeof(IDependency), "ImplementationName", new object[] { "parameter1", "parameter2" });

Last edited May 23, 2012 at 9:34 PM by dotnetricardo, version 6

Comments

roachslayer Jun 2, 2012 at 6:44 PM 
Can you elaborate on some usage examples?