public MainWindowViewModel(IPersonService personService, IDispatcher dispatcher, IEventAggregator aggregator, IDialogService dialogService)
            : base(personService, dispatcher, aggregator, dialogService)
        {
            PersonDirectoryViewModel = new PersonDirectoryViewModel(personService, dispatcher, aggregator, dialogService);
            PersonDetailsViewModel = new PersonDetailsViewModel(personService, dispatcher, aggregator, dialogService);

            AppStartCommand = new AsyncCommand(PersonDirectoryViewModel.RefreshAsync);
        }
Esempio n. 2
0
        public MainWindowViewModel(IPersonService personService, IDispatcher dispatcher, IEventAggregator aggregator, IDialogService dialogService)
            : base(personService, dispatcher, aggregator, dialogService)
        {
            PersonDirectoryViewModel = new PersonDirectoryViewModel(personService, dispatcher, aggregator, dialogService);
            PersonDetailsViewModel   = new PersonDetailsViewModel(personService, dispatcher, aggregator, dialogService);

            AppStartCommand = new AsyncCommand(PersonDirectoryViewModel.RefreshAsync);
        }
        private void GivenPerson()
        {
            viewModel = new PersonDetailsViewModel(personServiceMock.Object, dispatcherMock.Object, aggregatorMock.Object, dialogServiceMock.Object);

            viewModel.Person = persons[0];
        }
 private void GivenEmptyViewModel()
 {
     viewModel = new PersonDetailsViewModel(personServiceMock.Object, dispatcherMock.Object, aggregatorMock.Object, dialogServiceMock.Object);
 }