Ejemplo 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);
     }
 }
Ejemplo 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);
     }
 }
Ejemplo n.º 3
0
 partial void UpdateTrack(Track instance);
Ejemplo n.º 4
0
 partial void DeleteTrack(Track instance);
Ejemplo n.º 5
0
 partial void InsertTrack(Track instance);