public MainViewModel(Library library, INavigator navigator, ILibraryStore store, IChangeTracker changeTracker) : base(library) { Ensure.NotNull(navigator, "navigator"); Ensure.NotNull(changeTracker, "changeTracker"); changeTracker.Added += () => HasChange = true; changeTracker.Cleared += () => HasChange = false; Create = new DelegateCommand(() => navigator.CreateMovieAsync(library)); Edit = new EditMovieCommand(library, navigator); Delete = new DeleteMovieCommand(library.Movies, navigator, changeTracker); Save = new SaveCommand(library, store); OpenConfiguration = new DelegateCommand(() => navigator.LibraryConfigurationAsync(library)); }