Пример #1
0
 /// <summary>
 /// Used to fire off and update if one is needed.
 /// <param name="runAsync">If the update should run asynchronously.</param>
 /// </summary>
 public void FireOffUpdate()
 {
     // Fire off an update on a background thread.
     Task.Run(async() =>
     {
         // Call update on background man and give him a null deferral
         // since this won't be called from the background.
         await BackgroundMan.RunUpdate(new RefCountedDeferral(null));
     });
 }
Пример #2
0
 /// <summary>
 /// Used to fire off and update if one is needed.
 /// </summary>
 public void FireOffUpdate(bool runAsync = true)
 {
     if (runAsync)
     {
         Task.Run(() =>
         {
             BackgroundMan.RunUpdate();
         });
     }
     else
     {
         BackgroundMan.RunUpdate();
     }
 }