示例#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);
     }
 }
示例#2
0
 private void BuildLaps(Activity activity)
 {
     foreach (var lapElement in _activityElement.Descendants(LapName))
     {
         var lap =
             new Lap
                 {
                     Activity = activity,
                     AverageHeartRateBpm = RoundIntValueOrDefault(lapElement, "AverageHeartRateBpm"),
                     Calories = RoundIntValueOrDefault(lapElement, "Calories"),
                     DistanceMeters = RoundIntValueOrDefault(lapElement, "DistanceMeters", MetersMultiplyBy),
                     Intensity = GetValueOrDefault(lapElement, "Intensity"),
                     MaximumHeartRateBpm = RoundIntValueOrDefault(lapElement, "MaximumHeartRateBpm"),
                     MaximumSpeed = RoundIntValueOrDefault(lapElement, "MaximumSpeed", SpeedMultiplyBy),
                     TotalTimeSeconds = RoundIntValueOrDefault(lapElement, "TotalTimeSeconds"),
                     TriggerMethod = GetValueOrDefault(lapElement, "TriggerMethod"),
                 };
         BuildTracks(lapElement, lap);
         _laps.Add(lap);
     }
 }
示例#3
0
 partial void UpdateLap(Lap instance);
示例#4
0
 partial void DeleteLap(Lap instance);
示例#5
0
 partial void InsertLap(Lap instance);