public AddNewPlayListForUser(GenericInstruction gi) { this.Id = gi.Id; this.PlaylistId = gi.PlaylistId; this.UserId = gi.UserId; this.SongIds = gi.SongIds; }
public static IChangeInstruction Create(GenericInstruction gi) { if (gi.Type == ChangeInstructionType.AddSongToPlayList.ToString()) { return(new AddSongToPlayList(gi)); } if (gi.Type == ChangeInstructionType.AddNewPlayListForUser.ToString()) { return(new AddNewPlayListForUser(gi)); } if (gi.Type == ChangeInstructionType.RemoveExistingPlayList.ToString()) { return(new RemoveExistingPlayList(gi)); } return(null); }
public AddSongToPlayList(GenericInstruction gi) { this.Id = gi.Id; this.PlaylistId = gi.PlaylistId; this.SongId = gi.SongId; }