コード例 #1
0
        public IViewModel Create(Employer employer, EmployerViewModel viewModel)
        {
            IViewModel vm;

            switch (viewModel)
            {
            case EmployerViewModel.DETAIL:
                vm = new EmployerDetailViewModel(employer, _employerFacade);
                break;

            case EmployerViewModel.DELETION:
                vm = new EmployerDeletionViewModel(employer, _employerFacade);
                break;

            default:
                vm = new EmployerItemViewModel(employer, _employerFacade, this);
                break;
            }
            _viewModelResolver.BuildUp(vm);

            return(vm);
        }