Esempio n. 1
0
 private void BuildTracks(XElement lapElement, Lap lap)
 {
     foreach (var trackElement in lapElement.Descendants(TrackName))
     {
         var track =
             new Track
                 {
                     Lap = lap,
                 };
         BuildTrackpoints(trackElement, track);
         _tracks.Add(track);
     }
 }
Esempio n. 2
0
 private void BuildTrackpoints(XElement trackElement, Track track)
 {
     foreach (var trackpointElement in trackElement.Descendants(TrackpointName))
     {
         var positionElement = trackpointElement.Element("Position");
         var trackpoint =
             new Trackpoint
                 {
                     AltitudeMeters =
                         RoundIntValueOrDefault(trackpointElement, "AltitudeMeters", MetersMultiplyBy),
                     DistanceMeters =
                         RoundIntValueOrDefault(trackpointElement, "DistanceMeters", MetersMultiplyBy),
                     HeartRateBpm = RoundIntValueOrDefault(trackpointElement, "HeartRateBpm"),
                     LatitudeDegrees =
                         GetPositionValueOrDefault(positionElement, "LatitudeDegrees", DegreesMultiplyBy),
                     LongitudeDegrees =
                         GetPositionValueOrDefault(positionElement, "LongitudeDegrees", DegreesMultiplyBy),
                     SensorState = GetValueOrDefault(trackpointElement, "SensorState"),
                     Time = GetDateTimeValueOrDefault(trackpointElement, "Time"),
                     Track = track,
                 };
         _trackPoints.Add(trackpoint);
     }
 }
Esempio n. 3
0
 partial void UpdateTrack(Track instance);
Esempio n. 4
0
 partial void DeleteTrack(Track instance);
Esempio n. 5
0
 partial void InsertTrack(Track instance);