public async Task RequestAsync(TvShow tvShow, NormalTvSeason selectedSeason) { await _userInterface.DisplayTvShowDetailsAsync(tvShow); if (selectedSeason.IsRequested == RequestedState.Full) { await RequestNotificationsForSeasonAsync(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); } } } }
public async Task RequestAsync(TvShow tvShow, AllTvSeasons selectedSeason) { await _userInterface.DisplayTvShowDetailsAsync(tvShow); 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); foreach (var season in tvShow.Seasons.OfType <NormalTvSeason>().Where(x => !x.IsAvailable)) { await _tvShowNotificationWorkflow.NotifyForNewRequestAsync(_user.UserId, tvShow, season); } } } }
public async Task RequestAsync(TvShowRequest request, TvShow tvShow, NormalTvSeason selectedSeason) { var result = await _requester.RequestTvShowAsync(request, tvShow, selectedSeason); if (result.WasDenied) { await _userInterface.DisplayRequestDeniedForSeasonAsync(tvShow, selectedSeason); } else { await _userInterface.DisplayRequestSuccessForSeasonAsync(tvShow, selectedSeason); await _tvShowNotificationWorkflow.NotifyForNewRequestAsync(request.User.UserId, tvShow, selectedSeason); } }