Exemple #1
0
        protected override void LoadData(JObject json)
        {
            base.LoadData(json);

            if (Version == null && Description != null)
            {
                string description;
                Version = AcStringValues.GetVersionFromName(Description, out description);
                if (Version != null)
                {
                    Description = description;
                }
            }

            City    = json.GetStringValueOnly("city");
            GeoTags = json.GetGeoTagsValueOnly("geotags");

            if (Country == null)
            {
                foreach (var country in Tags.Select(AcStringValues.CountryFromTag).Where(x => x != null))
                {
                    Country = country;
                    break;
                }
            }

            SpecsLength   = json.GetStringValueOnly("length");
            SpecsWidth    = json.GetStringValueOnly("width");
            SpecsPitboxes = json.GetStringValueOnly("pitboxes");
        }
Exemple #2
0
        protected void LoadVersionInfo(JObject json)
        {
            Author  = json.GetStringValueOnly("author")?.Trim() ?? (TestIfKunos() ? AuthorKunos : null);
            Version = json.GetStringValueOnly("version")?.Trim();
            Url     = json.GetStringValueOnly("url")?.Trim();

            if (Version == null && Name != null)
            {
                string name;
                Version = AcStringValues.GetVersionFromName(Name, out name);
                if (Version != null)
                {
                    Name = name;
                }
            }
        }