public ApplicantController(IApplicantManager applicantManager, IValidationManager validationManager, IErrorMapper errorMapper, ILogger <ApplicantController> logger) { _applicantManager = applicantManager; _validationManager = validationManager; _errorMapper = errorMapper; _logger = logger; }
/// <summary> /// Creates a new instance of a model handler /// </summary> /// <param name="errorMapper">The error mapper for errors not mapped to any field</param> public ModelHandler(IErrorMapper errorMapper = null) { properties = typeof(TModel).GetProperties().ToDictionary(p => p.Name); mappedCollection = new List <MappedContext>(); _Model = new TModel(); this.errorMapper = errorMapper; }
public UsersController(IUserManagement userManagement, IRequestValidator requestValidator, ILogger <UsersController> logger, IErrorMapper errorMapper) { _userManagement = userManagement; _requestValidator = requestValidator; _logger = logger; _errorMapper = errorMapper; }
/// <summary> /// Erzeugt eine Instanz der Klasse LoginViewModel. /// </summary> /// <param name="navService">Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Referenz auf den Fehlerdienst der Anwendung.</param> public LoginViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { loginController = new LoginController(this); LoginCommand = new AsyncRelayCommand(param => executeLoginCommand()); }
/// <summary> /// Erzeugt eine Instanz der Klasse DialogBaseViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public DialogBaseViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { IsFlyoutOpen = false; ShowWarningFlyout = new RelayCommand(param => executeShowWarningFlyoutCommand(param)); PerformOriginalDrawerMenuActionCommand = new RelayCommand(param => executePerformOriginalDrawerMenuActionCommand()); }
/// <summary> /// Erzeugt eine Instanz der StartPageViewModel Klasse. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public StartPageViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { localUserController = new LocalUserController(this); // Liefere Referenz auf IValidationErrorReport mit. // Erstelle Befehle. CreateUserCommand = new AsyncRelayCommand(param => createLocalUser(), param => canCreateLocalUser()); }
/// <summary> /// Erzeugt eine Instanz der Klasse ModeratorHomescreenViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public ModeratorHomescreenViewModel(INavigationService navService, IErrorMapper errorMapper) : base (navService, errorMapper) { // Erzeuge Befehle. ChannelSelected = new RelayCommand(param => executeChannelSelected(param)); SwitchToAddChannelDialogCommand = new RelayCommand(param => executeSwitchToChannelAddDialogCommand()); SynchronizeManagedChannelsCommand = new AsyncRelayCommand(param => executeSynchronizeManagedChannelsCommand()); }
public ApiResponse(IErrorMapper errorMapper, IHttpStatusCodeMapper httpStatusCodeMapper) { _errorMapper = errorMapper ?? throw new ArgumentNullException(nameof(errorMapper)); _httpStatusCodeMapper = httpStatusCodeMapper ?? throw new ArgumentNullException(nameof(httpStatusCodeMapper)); _controller = new Controller(); }
public UserManagement(IUnitOfWork unitOfWork, IRepository <UserType> repository, IRepository <User> userRepository, IMapper mapper, IJwtTokenHandler jwtTokenHandler, ICryptographyHandler cryptographyHandler, IErrorMapper errorMapper) { _unitOfWork = unitOfWork; _repository = repository; _userRepository = userRepository; _mapper = mapper; _jwtTokenHandler = jwtTokenHandler; _cryptographyHandler = cryptographyHandler; _errorMapper = errorMapper; }
public MerchantCardPaymentsController( IPaymentService paymentService, IMapper mapper, IErrorMapper errorMapper, ILogger <MerchantCardPaymentsController> logger) { _paymentService = paymentService; _mapper = mapper; _errorMapper = errorMapper; _logger = logger; }
public static void EnableJsonErrorResponse(this IPipelines pipelines, IErrorMapper errorMapper) { pipelines.OnError += (context, exception) => { Logger.Error("[Logger]", exception); var statusCode = errorMapper.GetStatusCode(exception); return new ExceptionResponse(exception, statusCode); }; }
public void ConstructorShouldFailWhenErrorMapperIsNull() { // Arrange IErrorMapper errorMapper = null; var httpStatusCodeMapper = new Mock <IHttpStatusCodeMapper>().Object; // Act Action ctor = () => { new ApiResponse(errorMapper, httpStatusCodeMapper); }; // Assert ctor.Should().Throw <ArgumentNullException>(); }
public IpController(IValidator <DomainRequest> ipRequestValidator, IErrorMapper errorMapper, IDomainService domainService, IConfiguration iConfig, IIPMapper ipMapper, IDnsMapper idnsMapper, IPingMapper ipingMapper, IRdapMapper irdapMapper) { //_logger = logger; _ipRequestValidator = ipRequestValidator; _errorMapper = errorMapper; _domainService = domainService; _configuration = iConfig; _ipMapper = ipMapper; _idnsMapper = idnsMapper; _ipingMapper = ipingMapper; _irdapMapper = irdapMapper; }
public IpControllerTest() { _domainService = new DomainService(); _ipRequestValidator = new DomainValidator(); _ipMapper = new IPMapper(); _errorMapper = new ErrorMapper(); _ipingMapper = new PingMapper(); _idnsMapper = new DnsMapper(); _irdapMapper = new RdapMapper(); _ipController = new IpController(_ipRequestValidator, _errorMapper, _domainService , _iconfig, _ipMapper, _idnsMapper, _ipingMapper, _irdapMapper); _ipController.ControllerContext = new ControllerContext(); _ipController.ControllerContext.HttpContext = new DefaultHttpContext(); }
/// <summary> /// Set the error mapper used to display errors that are not mapped to any field /// </summary> /// <param name="errorMapper">Configured error mapper</param> /// <returns></returns> public ModelHandler <TModel> SetErrorMapper(IErrorMapper errorMapper) { this.errorMapper = errorMapper; return(this); }
public ErrorRepository(IErrorMapper errorMapper) { this.errorMapper = errorMapper; }
public ApplicantManager(ApplicantRepository applicantRepository, IErrorMapper errorMapper, ILogger <ApplicantManager> logger) { _applicantRepository = applicantRepository; _errorMapper = errorMapper; _logger = logger; }
/// <summary> /// Erzeugt eine Instanz der Klasse AddAndEditConversationViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public AddAndEditConversationViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { groupController = new GroupController(this); // Erzeuge Befehle. AddConversationCommand = new AsyncRelayCommand( param => executeAddConversationCommandAsync(), param => canAddConversation()); EditConversationCommand = new AsyncRelayCommand( param => executeEditConversationCommandAsync(), param => canEditConversation()); }
/// <summary> /// Erzeugt eine Instanz der HomescreenViewModel Klasse. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public HomescreenViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { groupController = new GroupController(); currentGroups = new Dictionary<int, Group>(); // Initialisiere die Befehle. SearchChannelsCommand = new RelayCommand(param => executeSearchChannelsCommand(), param => canSearchChannels()); AddGroupCommand = new RelayCommand(param => executeAddGroupCommand(), param => canAddGroup()); SearchGroupsCommand = new RelayCommand(param => executeSearchGroupsCommand(), param => canSearchGroups()); ChannelSelected = new RelayCommand(param => executeChannelSelected(param), param => canSelectChannel()); GroupSelected = new RelayCommand(param => executeGroupSelected(param), param => canSelectGroup()); SynchronizeAllGroupsCommand = new AsyncRelayCommand(param => executeSynchronizeAllGroupsCommandAsync(), param => canSynchronizeAllGroups()); SynchronizeAllChannelsCommand = new AsyncRelayCommand(param => executeSynchronizeAllChannelsCommandAsync(), param => canSynchronizeAllChannels()); }
/// <summary> /// Erzeugt eine Instanz der Klasse ReminderDetailsViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public ReminderDetailsViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { channelController = new ChannelController(); moderatorController = new ModeratorController(); // Befehle anlegen. SwitchToEditReminderDialogCommand = new RelayCommand( param => executeSwitchToEditReminderCommand(), param => canSwitchToEditReminderCommand()); DeleteReminderCommand = new AsyncRelayCommand( param => executeDeleteReminderCommand(), param => canDeleteReminder()); ActivateReminderCommand = new AsyncRelayCommand( param => executeActivateReminderCommand(), param => canActivateReminder()); DeactivateReminderCommand = new AsyncRelayCommand( param => executeDeactivateReminderCommand(), param => canDeactivateReminder()); SynchronizeReminderCommand = new AsyncRelayCommand( param => executeSynchronizeReminderCommand(), param => canSynchronizeReminder()); }
/// <summary> /// Erzeugt eine Instanz der Klasse BallotDetailsViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public BallotDetailsViewModel(INavigationService navService, IErrorMapper errorMapper) : base (navService, errorMapper) { groupController = new GroupController(this); localUser = groupController.GetLocalUser(); if (BallotOptionCollection == null) BallotOptionCollection = new ObservableCollection<Option>(); if (VoteResultsCollection == null) VoteResultsCollection = new ObservableCollection<VoteResult>(); PlaceVotesCommand = new AsyncRelayCommand( param => executePlaceVotesCommand(), param => canPlaceVotes()); SynchronizeBallotCommand = new AsyncRelayCommand( param => executeSynchronizeBallotCommand(), param => canSynchronizeBallot()); SwitchToEditDialogCommand = new RelayCommand( param => executeSwitchToEditDialogCommand(), param => canSwitchToEditDialog()); DeleteBallotCommand = new AsyncRelayCommand( param => executeDeleteBallotAsync(), param => canDeleteBallot()); }
/// <summary> /// Erzeugt eine Instanz der Klasse GroupParticipantsViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public GroupParticipantsViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { groupController = new GroupController(); if (ParticipantsCollection == null) ParticipantsCollection = new ObservableCollection<User>(); // Befehle RemoveParticipantCommand = new AsyncRelayCommand( param => executeRemoveParticipantCommand(param), param => canRemoveParticipants()); SynchronizeGroupParticipantsCommand = new AsyncRelayCommand( param => executeSynchronizeParticipants(), param => canSynchronizeParticipants()); UpdateDisplayingWarningStatusCommand = new RelayCommand( param => executeUpdateDisplayingWarningStatus()); }
public FileDownloaderController(IDownloader fileDownloader, IFileManager fileManager, IErrorMapper errorMapper) { _fileDownloader = fileDownloader; _fileManager = fileManager; _errorMapper = errorMapper; }
/// <summary> /// Erzeugt eine Instanz der Klasse ApplicationSettingsViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public ApplicationSettingsViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { applicationSettingsController = new ApplicationSettingsController(this); SaveSettingsCommand = new AsyncRelayCommand(param => executeSaveSettingsCommand()); }
/// <summary> /// Erzeugt eine Instanz der Klasse GroupDetailsViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public GroupDetailsViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { // Erzeuge Controller-Instanz. groupController = new GroupController(this); IsGroupParticipant = false; HasLeaveOption = false; localUser = groupController.GetLocalUser(); if (BallotCollection == null) BallotCollection = new ObservableCollection<Ballot>(); if (ConversationCollection == null) ConversationCollection = new ObservableCollection<Conversation>(); // Erzeuge Befehle. JoinGroupCommand = new AsyncRelayCommand( param => executeJoinGroupCommandAsync(), param => canJoinGroup()); LeaveGroupCommand = new AsyncRelayCommand( param => executeLeaveGroupCommandAsync(), param => canLeaveGroup()); EditGroupCommand = new RelayCommand( param => executeEditGroupCommand(), param => canEditGroup()); ConversationSelectedCommand = new RelayCommand( param => executeConversationSelectedCommand(param)); SynchronizeDataCommand = new AsyncRelayCommand( param => executeSynchronizeDataCommandAsync(), param => canSynchronizeData()); DeleteGroupCommand = new AsyncRelayCommand( param => executeDeleteGroupAsync(), param => canDeleteGroup()); DeleteGroupLocallyCommand = new RelayCommand( param => executeDeleteGroupLocallyCommand(), param => canDeleteGroupLocally()); ChangeToGroupSettingsCommand = new RelayCommand( param => executeChangeToGroupSettingsCommand(), param => canChangeToGroupSettings()); ChangeToAddConversationDialog = new RelayCommand( param => executeChangeToAddConversationDialog(), param => canChangeToAddConversationDialog()); BallotSelectedCommand = new RelayCommand( param => executeBallotSectedCommand(param)); SwitchToCreateBallotDialogCommand = new RelayCommand( param => executeSwitchToCreateBallotDialogCommand(), param => canSwitchToCreateBallotDialog()); SwichToGroupParticipantsViewCommand = new RelayCommand( param => executeSwitchToGroupParticipantsView(), param => canSwitchToGroupParticipantsView()); }
/// <summary> /// Erzeugt eine Instanz der Klasse AddGroupViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public AddAndEditGroupViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { // Erzeuge Referenz auf GroupController mit Validierungsfehler-Meldung. groupController = new GroupController(this); // Erzeuge Befehle. AddGroupCommand = new AsyncRelayCommand(param => executeAddGroupCommand(), param => canAddGroup()); EditGroupCommand = new AsyncRelayCommand(param => executeEditGroupAsync(), param => canEditGroup()); }
/// <summary> /// Erzeugt eine Instanz der Klasse ModeratorChannelDetailsViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper"></param> public ModeratorChannelDetailsViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { Reminders = new ObservableCollection<Reminder>(); reminderLookup = new Dictionary<int, Reminder>(); // Erzeuge Befehle. SwitchToAddAnnouncementDialogCommand = new RelayCommand( param => executeSwitchToAddAnnouncementDialogCommand(), param => canSwitchToAddAnnouncementDialog()); SwitchToEditChannelDialogCommand = new RelayCommand( param => executeSwitchToEditChannelDialogCommand(), param => canSwitchToEditChannelDialog()); SwitchToAddReminderDialogCommand = new RelayCommand( param => executeSwitchToAddReminderDialogCommand(), param => canSwitchToAddReminderDialog()); ReminderSelectedCommand = new RelayCommand( param => executeReminderSelectedCommand(param)); DeleteChannelCommand = new AsyncRelayCommand( param => executeDeleteChannelCommand()); SynchronizeWithServerCommand = new AsyncRelayCommand( param => executeSynchronizeWithServerCommand(), param => canPerformSynchronizationWithServer()); }
/// <summary> /// Erzeugt eine Instanz der Klasse GroupSettingsViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public GroupSettingsViewModel(INavigationService navService, IErrorMapper errorMapper) : base (navService, errorMapper) { groupController = new GroupController(); // Erzeuge Befehle. SaveNotificationSettingsCommand = new RelayCommand( param => executeSaveGroupNotificationSettingsCommand(), param => canSaveGroupSettings()); }
/// <summary> /// Erzeugt eine Instanz der Klasse ChannelDetailsBaseViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> protected ChannelDetailsBaseViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { channelController = new ChannelController(this); // Lade Anwendungseinstellungen und passe View Parameter entsprechend an. AppSettings appSettings = channelController.GetApplicationSettings(); if (appSettings.AnnouncementOrderSetting == OrderOption.ASCENDING) { ListRotationAngle = 0; ShowScrollBar = true; } else if (appSettings.AnnouncementOrderSetting == OrderOption.DESCENDING) { ListRotationAngle = 180; ShowScrollBar = false; } }
/// <summary> /// Erzeugt eine Instanz der Klasse AboutUniversityNewsViewModel. /// </summary> /// <param name="navService"></param> /// <param name="errorMapper"></param> public AboutUniversityNewsViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { }
public VehiclesController(IVehicleManagement vehicleManagement, IRequestValidator requestValidator, IErrorMapper errorMapper) { _vehicleManagement = vehicleManagement; _requestValidator = requestValidator; _errorMapper = errorMapper; }
/// <summary> /// Erzeuge eine Instanz der Klasse SearchChannelsViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorReporter">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public SearchChannelsViewModel(INavigationService navService, IErrorMapper errorReporter) : base(navService, errorReporter) { channelController = new ChannelController(); allChannels = new Dictionary<int, Channel>(); // Führe Online Update bei nächster Aktualisierung aus. performOnlineUpdate = true; // Initialisiere Befehle. StartChannelSearchCommand = new AsyncRelayCommand( param => executeChannelSearchAsync(), param => canExecuteSearch()); ReorderChannelsCommand = new AsyncRelayCommand( param => executeReorderChannelsCommandAsync()); ChannelSelectedCommand = new RelayCommand( param => executeChannelSelected(param), param => canSelectChannel()); SynchronizeChannelsCommand = new AsyncRelayCommand( param => executeSynchronizeChannelsCommand(), param => canSynchronizeChannels()); }
public LocationsController(ILocationManagement locationManagement, IRequestValidator requestValidator, IErrorMapper errorMapper) { _locationManagement = locationManagement; _requestValidator = requestValidator; _errorMapper = errorMapper; }
/// <summary> /// Erzeugt eine Instanz der Klasse AddAnnouncementViewModel /// </summary> /// <param name="navService"></param> /// <param name="errorMapper"></param> public AddAnnouncementViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { channelController = new ChannelController(this); // Initialisiere Parameter. IsMessagePriorityNormalSelected = true; IsMessagePriorityHighSelected = false; // Befehle anlegen. CreateNewAnnouncementCommand = new AsyncRelayCommand(param => executeCreateNewAnnouncementCommand()); }
/// <summary> /// Erzeugt eine Instanz der Klasse AddAndEditBallotViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public AddAndEditBallotViewModel(INavigationService navService, IErrorMapper errorMapper) : base (navService, errorMapper) { groupController = new GroupController(this); if (BallotOptionsCollection == null) BallotOptionsCollection = new ObservableCollection<Option>(); // Befehle CreateBallotCommand = new AsyncRelayCommand( param => executeCreateBallotCommandAsync(), param => canCreateBallot()); EditBallotCommand = new AsyncRelayCommand( param => executeEditBallotAsync(), param => canEditBallot()); AddBallotOptionCommand = new RelayCommand( param => executeAddOptionTextCommand(), param => canAddOptionText()); RemoveBallotOptionCommand = new RelayCommand( param => executeRemoveOptionTextCommand(param), param => canRemoveOptionText()); }
/// <summary> /// Erzeugt eine Instanz der Klasse AddAndEditReminderViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public AddAndEditReminderViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { channelController = new ChannelController(this); // Erzeuge Befehle. CreateReminderCommand = new AsyncRelayCommand(param => executeCreateReminderCommand()); EditReminderCommand = new AsyncRelayCommand(param => executeEditReminderCommand(), param => canEditReminder()); }
/// <summary> /// Erzeuge eine Instanz von der Klasse ChannelDetailsViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorReporter">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public ChannelDetailsViewModel(INavigationService navService, IErrorMapper errorReporter) : base(navService, errorReporter) { // Initialisiere Befehle. SubscribeChannelCommand = new AsyncRelayCommand( param => executeSubscribeChannel(), param => canSubscribeChannel()); UnsubscribeChannelCommand = new AsyncRelayCommand( param => executeUnsubscribeChannel()); SwitchToChannelSettingsCommand = new RelayCommand( param => executeSwitchToChannelSettingsCommand(), param => canSwitchToChannelSettings()); OpenDeleteChannelLocallyFlyoutCommand = new RelayCommand( param => executeOpenDeleteChannelLocallyFlyoutCommand(), param => canOpenDeleteChannelLocallyFlyout()); DeleteChannelLocallyFlyoutCommand = new RelayCommand( param => executeDeleteChannelLocallyCommand(), param => canDeleteChannelLocally()); SynchronizeChannelDataCommand = new AsyncRelayCommand( param => executeSynchronizeChannelDataCommandAsync(), param => canSyncChannelData()); }
/// <summary> /// Erzeugt eine Instanz der Klasse AddAndEditChannelViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public AddAndEditChannelViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { channelController = new ChannelController(this); // Lege Commands an. AddChannelCommand = new AsyncRelayCommand(param => executeAddChannelCommand()); EditChannelCommand = new AsyncRelayCommand(param => executeEditChannelCommand(), param => canEditChannel()); }
/// <summary> /// Erzeugt eine Instanz der Klasse SearchGroupViewModel. /// </summary> /// <param name="navService"></param> /// <param name="errorMapper"></param> public SearchGroupViewModel(INavigationService navService, IErrorMapper errorMapper) : base (navService, errorMapper) { // Erzeuge Instanz von GroupController. groupController = new GroupController(); if (Groups == null) { Groups = new ObservableCollection<Group>(); } // Setze initiale Parameter. WorkingGroupSelected = true; TutorialGroupSelected = true; HasEmptySearchResult = false; // Befehle erzeugen GroupSelectedCommand = new AsyncRelayCommand(param => executeGroupSelectedCommandAsync(param)); SearchGroupsCommand = new AsyncRelayCommand( param => executeSearchGroupsCommandAsync(), param => canSearchGroups() ); }
/// <summary> /// Erzeugt eine Instanz der Klasse ChannelEnumerationBaseViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> protected ChannelEnumerationBaseViewModel(INavigationService navService, IErrorMapper errorMapper) : base (navService, errorMapper) { channelController = new ChannelController(this); currentChannels = new Dictionary<int, Channel>(); }