/// <summary> /// Initializes a new instance of the <see cref="NavigationViewModel"/> class. /// </summary> /// <param name="accessControlManager">The access control manager.</param> /// <param name="commandFactory">The command factory.</param> protected NavigationViewModel( IAccessControlManager accessControlManager, ICommandFactory commandFactory) { _accessControlManager = accessControlManager; var commandFactoryHelper = CreateCommandFactoryHelper(commandFactory); CloseViewCommand = commandFactoryHelper.BuildDelegateCommand(() => CloseViewCommand, ExecuteCloseViewCommand); _commandsList = new Dictionary <string, INavigationCommand> (); NavigationCommandManager = new NavigationCommandManager(_commandsList); DefaultCommand = NavigationCommandManager.BuildCommand(() => DefaultCommand, NavigateToDefaultCommand, CanNavigateToDefaultCommand); }
/// <summary> /// Initializes a new instance of the <see cref="NavigationViewModel"/> class. /// </summary> /// <param name="accessControlManager">The access control manager.</param> /// <param name="commandFactory">The command factory.</param> protected NavigationViewModel ( IAccessControlManager accessControlManager, ICommandFactory commandFactory ) { _accessControlManager = accessControlManager; var commandFactoryHelper = CreateCommandFactoryHelper ( commandFactory ); CloseViewCommand = commandFactoryHelper.BuildDelegateCommand ( () => CloseViewCommand, ExecuteCloseViewCommand ); _commandsList = new Dictionary<string, INavigationCommand> (); NavigationCommandManager = new NavigationCommandManager ( _commandsList ); DefaultCommand = NavigationCommandManager.BuildCommand ( () => DefaultCommand, NavigateToDefaultCommand, CanNavigateToDefaultCommand ); }