public async void Run(IBackgroundTaskInstance taskInstance) { var deferral = taskInstance.GetDeferral(); var updater = new LiveTileScheduler(); await updater.CreateSchedule(); deferral.Complete(); }
private void RescheduleTileUpdate(LiveTileScheduler updater) { updater.ReSchedule(Clocks.Select(c => new Tasks.Domain.CityInfo { Id = c.Id, Name = c.Name, TimeZoneId = c.TimeZoneId })); }
private void Clocks_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { _repository.Save(Clocks); var updater = new LiveTileScheduler(); Task.Factory.StartNew(() => { updater.ReSchedule(Clocks.Select(c => new Tasks.Domain.CityInfo { Id = c.Id, Name = c.Name, TimeZoneId = c.TimeZoneId })); }, TaskCreationOptions.LongRunning); }
private void OnClocksCollectionChanged() { var updater = new LiveTileScheduler(); _citiesRepository.Save(Clocks); Task.Factory.StartNew(() => RescheduleTileUpdate(updater), TaskCreationOptions.LongRunning); }