public DisplayService( IDialogsDisplayRegistry dialogsDisplayRegistry, IWindowsDisplayRegistry windowsDisplayRegistry, IUnityContainer unityContainer) { _dialogsDisplayRegistry = dialogsDisplayRegistry ?? throw new ArgumentNullException(nameof(dialogsDisplayRegistry)); _windowsDisplayRegistry = windowsDisplayRegistry ?? throw new ArgumentNullException(nameof(windowsDisplayRegistry)); _unityContainer = unityContainer ?? throw new ArgumentNullException(nameof(unityContainer)); }
public SelectEntityDialogViewModel( IPaginationSearchableRepository <TEntity> searchableRepository, IDialogsDisplayRegistry dialogsDisplayRegistry, IModelMapper <TEntity, TModel> entityMapper, IDisplayService displayService) { _dialogsDisplayRegistry = dialogsDisplayRegistry ?? throw new ArgumentNullException(nameof(dialogsDisplayRegistry)); _searchableRepository = searchableRepository ?? throw new ArgumentNullException(nameof(searchableRepository)); _displayService = displayService ?? throw new ArgumentNullException(nameof(displayService)); _entityMapper = entityMapper ?? throw new ArgumentNullException(nameof(entityMapper)); ItemsListViewModel = new ItemsListViewModel <TModel>(); ApplyCommand = new RelayCommand(_ => CloseAction(ItemsListViewModel.SelectedItem)); CancelCommand = new RelayCommand(_ => CloseAction(default(TModel))); }