protected override void LoadYear(JObject json) { Year = json.GetIntValueOnly("year"); if (Year.HasValue) return; int year; if (DataProvider.Instance.ShowroomYears.TryGetValue(Id, out year)) { Year = year; } else if (Name != null) { Year = AcStringValues.GetYearFromName(Name) ?? AcStringValues.GetYearFromId(Name); } }
private void LoadSkinRelated(JObject json) { DriverName = json.GetStringValueOnly("drivername")?.Trim(); Team = json.GetStringValueOnly("team")?.Trim(); SkinNumber = json.GetStringValueOnly("number")?.Trim(); Priority = json.GetIntValueOnly("priority"); }
protected virtual void LoadYear(JObject json) { Year = json.GetIntValueOnly("year"); if (!Year.HasValue && Name != null) { Year = AcStringValues.GetYearFromName(Name) ?? AcStringValues.GetYearFromId(Name); } }