private void ImportEffortsFromStrava() { efforts = new List<Models.Effort>(); var originalCulture = Utils.SetStravaCultureAndReturnCurrentCulture(); try { SegmentService serv = new SegmentService(StravaWebClientObj); Stravan.Segment segmentinfo = serv.Show(segmentID); GetEfforts(serv); AthleteUpdate.UpdateAthlete(); SaveEfforts(); } finally { Thread.CurrentThread.CurrentCulture = originalCulture; } }
private void GetEfforts(SegmentService serv) { SegmentEfforts stravaEfforts; int offset = 0; do { stravaEfforts = serv.Efforts(segmentID, offset: offset); if (BreakAtOffset > 0 && offset > BreakAtOffset) break; } while (GetEffortsLoop(ref stravaEfforts, ref offset)); }