コード例 #1
0
 private async Task SaveScrobblesQueue(CancellationToken cancellationToken)
 {
     if (scrobblesQueue.Any())
     {
         var scrobbles = scrobblesQueue.ToArray();
         await sessionDataService.SaveData(ScrobblesDataKey, scrobbles, cancellationToken);
     }
     else
     {
         await sessionDataService.PurgeData(ScrobblesDataKey, cancellationToken);
     }
 }
コード例 #2
0
 private async void OnPlaylistFinished(CancellationToken cancellationToken)
 {
     await sessionDataService.PurgeData(PlaylistDataKey, cancellationToken);
 }