|
I still get an error becuase have not wired up the viewmodels to the container.
Here is a snipper that works with UnityIOC: (how do i do the same for Structuremap???)
=============
IUnityContainer unity = new UnityContainer();
// Register our services.
unity.RegisterType<IFileService, FileService>();
// Register all the ViewModels in our project.))
foreach (Type t in typeof(ViewModel).Assembly.GetTypes())
{
if (typeof(ViewModel).IsAssignableFrom(t))
{
unity.RegisterType(t);
}
}
=======================
the above code works for unityIOC, how do i make it work for structuremap???
what is the equivalent command of [ unit.registerType(t) ] ?????
|