本文整理汇总了C#中Season.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Season.ToString方法的具体用法?C# Season.ToString怎么用?C# Season.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Season
的用法示例。
在下文中一共展示了Season.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetStatsRanked
/// <summary>
/// Get ranked stats for this summoner synchronously.
/// Includes statistics for Twisted Treeline and Summoner's Rift.
/// </summary>
/// <param name="season">Season for which you want the stats.</param>
/// <returns>A list of champions stats.</returns>
public List<ChampionStats> GetStatsRanked(Season season)
{
var json = requester.CreateRequest(
string.Format(StatsRootUrl, Region) + string.Format(StatsRankedUrl, Id),
Region,
new List<string>() { string.Format("season={0}", season.ToString().ToUpper()) });
return JsonConvert.DeserializeObject<RankedStats>(json).ChampionStats;
}
示例2: GetStatsRankedAsync
/// <summary>
/// Get ranked stats for this summoner asynchronously.
/// Includes statistics for Twisted Treeline and Summoner's Rift.
/// </summary>
/// <param name="season">Season for which you want the stats.</param>
/// <returns>A list of champions stats.</returns>
public async Task<List<ChampionStats>> GetStatsRankedAsync(Season season)
{
var json = await requester.CreateRequestAsync(
string.Format(StatsRootUrl, Region) + string.Format(StatsRankedUrl, Id),
Region,
new List<string>() { string.Format("season={0}", season.ToString().ToUpper()) });
return (await Task.Factory.StartNew<RankedStats>(() =>
JsonConvert.DeserializeObject<RankedStats>(json))).ChampionStats;
}
示例3: GetStatsSummariesAsync
/// <summary>
/// Get player stats summaries for this summoner asynchronously. One summary is returned per queue type.
/// </summary>
/// <param name="season">Season for which you want the stats.</param>
/// <returns>A list of player stats summaries.</returns>
public async Task<List<PlayerStatsSummary>> GetStatsSummariesAsync(Season season)
{
var json = await requester.CreateRequestAsync(
string.Format(StatsRootUrl, Region) + string.Format(StatsSummaryUrl, Id),
Region,
new List<string>() { string.Format("season={0}", season.ToString().ToUpper()) });
return (await Task.Factory.StartNew<PlayerStatsSummaryList>(() =>
JsonConvert.DeserializeObject<PlayerStatsSummaryList>(json))).PlayerStatSummaries;
}
示例4: GetStatsSummaries
/// <summary>
/// Get player stats summaries for this summoner synchronously. One summary is returned per queue type.
/// </summary>
/// <param name="season">Season for which you want the stats.</param>
/// <returns>A list of player stats summaries.</returns>
public List<PlayerStatsSummary> GetStatsSummaries(Season season)
{
var json = requester.CreateRequest(
string.Format(StatsRootUrl, Region) + string.Format(StatsSummaryUrl, Id),
Region,
new List<string>() { string.Format("season={0}", season.ToString().ToUpper()) });
return JsonConvert.DeserializeObject<PlayerStatsSummaryList>(json).PlayerStatSummaries;
}
示例5: GetStatsRankedV12Async
public async Task<List<ChampionStatsV12>> GetStatsRankedV12Async(Season season)
{
var json = await requester.CreateRequestAsync(string.Format(StatsRootV12Url, Region)
+ string.Format(StatsRankedUrl, Id)
, new List<string>() { string.Format("season={0}", season.ToString().ToUpper()) });
return (await JsonConvert.DeserializeObjectAsync<RankedStatsV12>(json)).ChampionStats;
}
示例6: GetStatSummary
/// <summary>
/// Gets a comprehensive list of stats for a summoner
/// </summary>
/// <param name="season">The season to check for</param>
/// <returns></returns>
public PlayerStatsSummaryList GetStatSummary(Season season)
{
jSerializer = new DataContractJsonSerializer(typeof(PlayerStatsSummaryList));
webClient = new WebClient();
PlayerStatsSummaryList summary = new PlayerStatsSummaryList();
string seasontxt = "season=" + season;
try
{
summary = (PlayerStatsSummaryList)jSerializer.ReadObject(webClient.OpenRead(string.Format("http://prod.api.pvp.net/api/lol/{1}/v1.2/stats/by-summoner/{0}/summary?{3}&api_key={2}", _id, _region, LolInfo.APIKEY, season.ToString())));
}
catch (WebException e)
{
throw new Exception(e.Message);
}
return summary;
}
示例7: GetStatsSummariesV11Async
public async Task<List<PlayerStatsSummaryV11>> GetStatsSummariesV11Async(Season season)
{
var json = await requester.CreateRequestAsync(string.Format(StatsV11RootUrl, Region)
+ string.Format(StatsSummaryUrl, Id)
, new List<string>() { string.Format("season={0}", season.ToString().ToUpper()) });
return (await JsonConvert.DeserializeObjectAsync<PlayerStatsSummaryListV11>(json)).PlayerStatSummaries;
}