コード例 #1
0
 public DataAsyncResult UpdatePlaylist(Playlist entity, TaskParam taskParam)
 {
     return this.EnqueueRequest(taskParam, () =>
     {
         base.PlaylistDataService.Update(entity);
         return null;
     });
 }
コード例 #2
0
 public void RemoveAudioMediaFromPlaylist(AudioMedia audioMedia, Playlist playlist)
 {
     base.PlaylistAudioMediaDataService.Delete(new PlaylistAudioMedia() { PlaylistId = playlist.Id, AudioMediaId = audioMedia.Id });
     playlist.Songs.Remove(audioMedia);
 }
コード例 #3
0
 public void AddAudioMediaToPlaylist(AudioMedia audioMedia, Playlist playlist)
 {
     base.PlaylistAudioMediaDataService.Insert(new PlaylistAudioMedia() { PlaylistId = playlist.Id, AudioMediaId = audioMedia.Id });
     playlist.Songs.Add(audioMedia);
 }
コード例 #4
0
 public DataAsyncResult AddPlaylist(string title, TaskParam taskParam)
 {
     return this.EnqueueRequest(taskParam, () =>
     {
         var entity = new Playlist()
         {
             Title = title,
             Visible = true
         };
         base.PlaylistDataService.Insert(entity);
         this.Playlists.Add(entity);
         return null;
     });
 }
コード例 #5
0
 public void Play(Playlist playlist)
 {
     this.PlayInternal(playlist.SongsVisible);
 }