/// <summary> /// Get tournament round as an asynchronous operation /// </summary> /// <param name="cultures">A <see cref="IEnumerable{CultureInfo}" /> specifying the languages to which the returned instance should be translated</param> /// <returns>A <see cref="Task{T}" /> representing an async operation</returns> public async Task<RoundCI> GetTournamentRoundAsync(IEnumerable<CultureInfo> cultures) { var cultureInfos = cultures as CultureInfo[] ?? cultures.ToArray(); if (_tournamentRound != null && _tournamentRound.HasTranslationsFor(cultureInfos)) { return _tournamentRound; } await FetchMissingSummary(cultureInfos, false).ConfigureAwait(false); return _tournamentRound; }
/// <summary> /// Get current round as an asynchronous operation /// </summary> /// <param name="cultures">The cultures</param> /// <returns>A <see cref="Task{TResult}" /> representing an async operation</returns> public async Task <RoundCI> GetCurrentRoundAsync(IEnumerable <CultureInfo> cultures) { var wantedCultures = cultures as CultureInfo[] ?? cultures.ToArray(); if (_round != null && _round.HasTranslationsFor(wantedCultures)) { return(_round); } await FetchMissingSummary(wantedCultures, false).ConfigureAwait(false); return(_round); }