public void ClientIsNull_ThrowsArgumentNullException()
            {
                // Arrange
                ISteamCommunityDataClient client = null;
                var appId         = 247080U;
                var leaderboardId = 739999;

                // Act -> Assert
                Assert.Throws <ArgumentNullException>(() =>
                {
                    client.GetLeaderboardEntriesAsync(appId, leaderboardId);
                });
            }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="steamCommunityDataClient"></param>
        /// <param name="appId"></param>
        /// <param name="leaderboardId"></param>
        /// <param name="params"></param>
        /// <param name="progress"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        public static Task <LeaderboardEntriesEnvelope> GetLeaderboardEntriesAsync(
            this ISteamCommunityDataClient steamCommunityDataClient,
            uint appId,
            int leaderboardId,
            GetLeaderboardEntriesParams @params = default,
            IProgress <long> progress           = default,
            CancellationToken cancellationToken = default)
        {
            if (steamCommunityDataClient == null)
            {
                throw new ArgumentNullException(nameof(steamCommunityDataClient));
            }

            return(steamCommunityDataClient.GetLeaderboardEntriesAsync(appId.ToString(), leaderboardId, @params, progress, cancellationToken));
        }