Beispiel #1
0
        private void ApplyNewName(string newName)
        {
            var renameService = new RenameService(this.PersistedFavorites);
            var updateCommand = new FavoriteRenameCommand(this.persistence, renameService);
            var newNameValid  = updateCommand.ValidateNewName(this.editedFavorite, newName);

            if (!newNameValid)
            {
                return;
            }
            updateCommand.ApplyRename(this.editedFavorite, newName);
            this.UpdateFavoritesBindingSource();
        }
 private void ApplyNewName(string newName)
 {
     var renameService = new RenameService(this.PersistedFavorites);
     var updateCommand = new FavoriteRenameCommand(this.persistence, renameService);
     bool newNameValid = updateCommand.ValidateNewName(this.editedFavorite, newName);
     if (!newNameValid)
         return;
     updateCommand.ApplyRename(this.editedFavorite, newName);
     this.UpdateFavoritesBindingSource();
 }