Ejemplo n.º 1
0
        // Constructor will be called by Unity through constructor injection paramenters...
        public LoginUseCase(
            // Get the ViewToRegionBinder that the baseclass needs
            IViewToRegionBinder viewtoToRegionBinder
            , IRegionManager regionManager
            // Get the factories that can create the viewmodels
            , ObjectFactory <LoginViewModel> loginViewModel
            , ObjectFactory <LoginToolbarViewModel> loginToolbarViewModel
            , IApplicationModel applicationModel)
            : base(viewtoToRegionBinder)
        {
            this._applicationModel = applicationModel;

            // Just before the view is initialized for the first time
            this.AddInitializationMethods(
                // Create the emailViewModel and assign it to this variable
                () => this._loginViewModel          = loginViewModel.CreateInstance()
                , () => this._loginToolbarViewModel = loginToolbarViewModel.CreateInstance());
        }
        // Constructor will be called by Unity through constructor injection paramenters...
        public LoginUseCase(
            // Get the ViewToRegionBinder that the baseclass needs
            IViewToRegionBinder viewtoToRegionBinder
            , IRegionManager regionManager
            // Get the factories that can create the viewmodels
            , ObjectFactory<LoginViewModel> loginViewModel
            , ObjectFactory<LoginToolbarViewModel> loginToolbarViewModel
            , IApplicationModel applicationModel)
            : base(viewtoToRegionBinder)
        {
            this._applicationModel = applicationModel;

            // Just before the view is initialized for the first time
            this.AddInitializationMethods(
                // Create the emailViewModel and assign it to this variable
               () => this._loginViewModel = loginViewModel.CreateInstance()
               , () => this._loginToolbarViewModel = loginToolbarViewModel.CreateInstance());
        }