Exemplo n.º 1
0
        public async Task RequestAsync(TvShow tvShow, FutureTvSeasons selectedSeason)
        {
            await _userInterface.DisplayTvShowDetailsAsync(tvShow);

            if (tvShow.IsRequested)
            {
                await _tvShowNotificationWorkflow.NotifyForExistingRequestAsync(_user.UserId, tvShow, selectedSeason);
            }
            else
            {
                var wasRequested = await _userInterface.GetTvShowRequestConfirmationAsync(selectedSeason);

                if (wasRequested)
                {
                    var result = await _requester.RequestTvShowAsync(_user, tvShow, selectedSeason);

                    if (result.WasDenied)
                    {
                        await _userInterface.DisplayRequestDeniedForSeasonAsync(selectedSeason);
                    }
                    else
                    {
                        await _userInterface.DisplayRequestSuccessForSeasonAsync(selectedSeason);

                        await _tvShowNotificationWorkflow.NotifyForNewRequestAsync(_user.UserId, tvShow, selectedSeason);
                    }
                }
            }
        }
Exemplo n.º 2
0
 private async Task RequestNotificationsForSeasonAsync(TvShow tvShow, TvSeason selectedSeason)
 {
     if (selectedSeason.IsAvailable)
     {
         await _userInterface.WarnSeasonAlreadyAvailableAsync(selectedSeason);
     }
     else
     {
         await _tvShowNotificationWorkflow.NotifyForExistingRequestAsync(_user.UserId, tvShow, selectedSeason);
     }
 }
Exemplo n.º 3
0
 public async Task HandleSelectionAsync(TvShowRequest request, TvShow tvShow, FutureTvSeasons selectedSeason)
 {
     if (tvShow.IsRequested)
     {
         await _tvShowNotificationWorkflow.NotifyForExistingRequestAsync(request.User.UserId, tvShow, selectedSeason);
     }
     else
     {
         await _userInterface.DisplayTvShowDetailsForSeasonAsync(request, tvShow, selectedSeason);
     }
 }