protected virtual void LoadYear(JObject json) { Year = json.GetIntValueOnly("year"); if (!Year.HasValue && Name != null) { Year = AcStringValues.GetYearFromName(Name) ?? AcStringValues.GetYearFromId(Name); } }
protected override void LoadYear(JObject json) { Year = json.GetIntValueOnly("year"); if (Year.HasValue) { return; } int year; if (DataProvider.Instance.CarYears.TryGetValue(Id, out year)) { Year = year; } else if (Name != null) { Year = AcStringValues.GetYearFromName(Name) ?? AcStringValues.GetYearFromId(Name); } }