コード例 #1
0
 public void IntialSetup(string athleteId, string accessToken)
 {
     DataManipulatorHandler.CreateSingleton(athleteId, accessToken);
     activityCacheHandler = new ActivityCacheHandler();
     activityCacheHandler.Init(Int64.Parse(athleteId));
     Title        = "Alerts";
     this.Seconds = 10;
 }
コード例 #2
0
 public void InitliseServiceAndCache(string athleteId, string stravaId, string accessToken)
 {
     activitySummaryServiceHandler = new ActivitySummaryServiceHandler();
     activitySummaryCacheHandler   = new ActivitySummaryCacheHandler();
     activityServiceHandler        = new ActivityServiceHandler();
     activityCacheHandler          = new ActivityCacheHandler();
     activitySummaryServiceHandler.Init(athleteId, stravaId, accessToken);
     activityServiceHandler.Init(athleteId, stravaId, accessToken);
     activityCacheHandler.Init(Int64.Parse(athleteId));
 }
コード例 #3
0
        public async void SyncCachedActivities()
        {
            try
            {
                await CreateActivites();

                foreach (var activity in await FindAllActivities())
                {
                    activityCacheHandler.Init(activity.activityId, activity.athleteId.athleteId, activity.stravaid, activity.name, activity.startDate, activity.timeZone);
                    await activityCacheHandler.Create();
                }
            }
            catch (Exception)
            {
                await DisplayAlert("Error", "Sync Failure", "OK");
            }
        }
コード例 #4
0
 private DataManipulatorHandler(string athleteId, string accessToken)
 {
     this.AccessToken     = accessToken;
     activityCacheHandler = new ActivityCacheHandler();
     activityCacheHandler.Init(Int64.Parse(athleteId));
 }