Exemple #1
0
        public static IUnityContainer RegisterTypeForNavigationFromViewModel <TViewModel>(this IUnityContainer container) where TViewModel : class
        {
            var viewType = PageNavigationTypeResolver.ResolveForViewType <TViewModel>();
            var name     = PageNavigationNameResolver.Resolve <TViewModel>();

            return(container.RegisterTypeForNavigation(viewType, name));
        }
Exemple #2
0
        public static IUnityContainer RegisterTypeForNavigationFromViewModel <TView, TViewModel>(this IUnityContainer container)
            where TView : class
            where TViewModel : class
        {
            ViewModelLocationProvider.Register <TView, TViewModel>();
            var name = PageNavigationNameResolver.Resolve <TViewModel>();

            return(container.RegisterTypeForNavigation(typeof(TView), name));
        }