Beispiel #1
0
 private void GenerateDataAfterUpdate(object sender, EventArgs e)
 {
     _srcMLService.UpdateArchivesCompleted -= GenerateDataAfterUpdate;
     IsUpdating = true;
     _srcMonitor.UpdateArchivesAsync()
     .ContinueWith((t) => {
         _srcMonitor.Save();
         CurrentWorkingSet.InitializeAsync().Wait();
     }, TaskContinuationOptions.OnlyOnRanToCompletion)
     .ContinueWith((t) => {
         IsUpdating = false;
         _srcMonitor.StartMonitoring();
         CurrentWorkingSet.StartMonitoring();
     }, TaskContinuationOptions.OnlyOnRanToCompletion);
 }
 /// <summary>
 /// Saves the state for this service
 /// </summary>
 protected override void Save()
 {
     _srcMonitor.Save();
 }