public RideEffortsV2 ToRideEfforts() { var rideEffort = new RideEffortsV2 { RideId = ConvertWrapper.ToInt32(Id), Version = Version, Efforts = new List <EffortSegmentV2>() }; if (Efforts != null) { Efforts.Each(effort => rideEffort.Efforts.Add(effort.ToEffortSegment())); } return(rideEffort); }
public MapDetailV2 ToMapDetail() { var map = new MapDetailV2 { RideId = ConvertWrapper.ToInt32(Id), Version = Version, Coordinates = new List <Coordinate>() }; if (Coordinates != null) { Coordinates.Each(pair => { if (pair.Count == 2) { map.Coordinates.Add(new Coordinate { Latitude = pair[0], Longitude = pair[1] }); } }); } return(map); }