예제 #1
0
        public NewResourceUseCase(
            // Get the ViewToRegionBinder that the baseclass needs
            IViewToRegionBinder viewtoToRegionBinder
            // Get the factories that can create the viewmodels
            , ObjectFactory <ResourceEditViewModel> resourceEditViewModel
            , IModelVisualizationRegistry modelVisualizationRegistry)
            : base(viewtoToRegionBinder)
        {
            // Just before the view is initialized for the first time
            this.AddInitializationMethods(
                // Create the emailViewModel and assign it to this variable
                () => this._resourceEditViewModel = resourceEditViewModel.CreateInstance());

            // Register visualizations for these view models. This means: whenever a viewmodel is displayed,
            // use this type of view to visualize it.
            modelVisualizationRegistry.Register <ResourceEditViewModel, ResourceEditView>();
        }
        public NewResourceUseCase(
            // Get the ViewToRegionBinder that the baseclass needs
            IViewToRegionBinder viewtoToRegionBinder
            // Get the factories that can create the viewmodels
            , ObjectFactory<ResourceEditViewModel> resourceEditViewModel
            , IModelVisualizationRegistry modelVisualizationRegistry)
           : base(viewtoToRegionBinder)
        {
            // Just before the view is initialized for the first time
            this.AddInitializationMethods(
                // Create the emailViewModel and assign it to this variable
               () => this._resourceEditViewModel = resourceEditViewModel.CreateInstance());

            // Register visualizations for these view models. This means: whenever a viewmodel is displayed, 
            // use this type of view to visualize it. 
            modelVisualizationRegistry.Register<ResourceEditViewModel, ResourceEditView>();
        }