public static IEnumerable <Lazy <T, M> > GetExportsResolved <T, M>(this CompositionContainer mefContainer,
                                                                    IUnityContainer unityContainer)
     where T : class where M : class
 {
     // wrap the resolve around unity resolve then change type to T
     return(mefContainer.GetExportTypesWithMetadata <T, M>()
            .Select(kv => new Lazy <T, M>(() => unityContainer.Resolve(kv.Key) as T, kv.Value)));
 }