public static CfCacheIndexEntry ToCacheIndexEntry(this Climb o)
 {
     return(new CfCacheIndexEntry()
     {
         ID = o.ID, CountryID = o.CountryID, Name = o.Name, NameShort = "", TypeID = (byte)o.Type, NameUrlPart = o.NameUrlPart
     });
 }
Пример #2
0
        private void FixupClimb(Climb previousValue)
        {
            if (previousValue != null && previousValue.LoggedClimbs.Contains(this))
            {
                previousValue.LoggedClimbs.Remove(this);
            }

            if (Climb != null)
            {
                if (!Climb.LoggedClimbs.Contains(this))
                {
                    Climb.LoggedClimbs.Add(this);
                }
                if (ClimbID != Climb.ID)
                {
                    ClimbID = Climb.ID;
                }
            }
        }