예제 #1
0
            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);
            }
예제 #2
0
            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);
            }