IUnityContainer uContainer = new UnityContainer()
.RegisterType<IMyInterface, FirstObject>()
.RegisterType<MyBaseClass, SecondObject>();
MyObject myInstance = uContainer.Resolve<MyObject>();
// now access the public variables containing the dependencies
IMyInterface depObjA = myInstance.depObjectA;
MyBaseClass depObjB = myInstance.depObjectB;