Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #123 from abuZayed15/issue-122
Browse files Browse the repository at this point in the history
add RankInfo backing field
  • Loading branch information
aspriddell authored Oct 15, 2020
2 parents 9403f2e + 377f142 commit 6b96efb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DragonFruit.Six.API/Data/SeasonStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
// Licensed under Apache-2. Please refer to the LICENSE file for more info

using System;
using DragonFruit.Six.API.Data.Containers;
using DragonFruit.Six.API.Enums;
using Newtonsoft.Json;

namespace DragonFruit.Six.API.Data
{
public class SeasonStats
{
private RankContainer _rankInfo;

[JsonProperty("guid")]
public string Guid { get; set; }

Expand Down Expand Up @@ -77,5 +80,7 @@ public class SeasonStats

[JsonProperty("last_match_skill_stdev_change")]
public double LastMatchSkillUncertaintyChange { get; set; }

public RankContainer RankInfo => _rankInfo ??= Rank > 14 ? References.Ranks((int)Rank) : References.LegacyRanks((int)Rank);
}
}

0 comments on commit 6b96efb

Please sign in to comment.