コード例 #1
0
ファイル: StatusTests.cs プロジェクト: riftgg/RiotNet
        public async Task GetShardDataAsyncTest_WithClientPlatformId()
        {
            IRiotClient client = RiotClient.ForPlatform(PlatformId.LA2);
            ShardStatus shard  = await client.GetShardDataAsync();

            Assert.That(shard, Is.Not.Null);
            Assert.That(shard.Name, Is.EqualTo("Latin America South"));
            Assert.That(shard.Slug, Is.EqualTo("las"));
            Assert.That(shard.RegionTag, Is.EqualTo("la2"));
        }
コード例 #2
0
 /// <summary>
 /// Gets the status of the shard for the specified platform. This is an alias for <see cref="IRiotClient.GetShardDataAsync"/>.
 /// </summary>
 /// <param name="riotClient">The IRiotClient instance.</param>
 /// <param name="platformId">The platform ID of the server to connect to. This should equal one of the <see cref="Models.PlatformId"/> values. If unspecified, the <see cref="IRiotClient.PlatformId"/> property will be used.</param>
 /// <param name="token">The cancellation token to cancel the operation.</param>
 /// <returns>A task representing the asynchronous operation.</returns>
 public static Task <ShardStatus> GetShardStatusAsync(this IRiotClient riotClient, string platformId = null, CancellationToken token = default(CancellationToken))
 {
     return(riotClient.GetShardDataAsync(platformId, token));
 }