示例#1
0
 static async Task CheckUpdates(ProgressMonitor monitor, object[] handlers, bool automatic)
 {
     using (monitor) {
         // The handler to use is the last one declared in the extension point
         if (handlers.Length == 0)
         {
             return;
         }
         try {
             IUpdateHandler uh = (IUpdateHandler)handlers [handlers.Length - 1];
             await uh.CheckUpdates(monitor, automatic);
         } catch (Exception ex) {
             LoggingService.LogError("Updates check failed for handler of type '" + handlers [handlers.Length - 1].GetType() + "'", ex);
         }
     }
 }