/// <summary> /// Gets the combined ladder of the game. /// </summary> /// <returns>The ladder with bot and human players.</returns> public async Task <ICollection <LadderItem> > GetLadder() { DisposeGuard(); if (!TryBeginInvoke()) { return(null); } ICollection <LadderItem> result; try { result = (await _client.GetLadderAsync()).ToList().AsReadOnly(); } catch (TaskCanceledException) { TryEndInvoke(); return(null); } TryEndInvoke(); return(result); }
/// <summary> /// Gets the ladder. /// </summary> /// <param name="botsLadder"> /// If true, it will return the bots' ladder. /// If false, it will return the human players' ladder. /// If not set (default) it will return the combined ladder. /// </param> /// <returns>The ladder list. If there was an error, it returns null.</returns> public virtual async Task <IEnumerable <LadderItem> > GetLadder(bool?botsLadder = null) { return(await _client.GetLadderAsync(botsLadder)); }