Exemple #1
0
 private void ExecuteUpdateCustomInfoParseEven(AppCast appCast, ParseUpdateInfoHandler parseUpdateInfoHandler, out UpdateInfoEventArgs info)
 {
     info = null;
     try
     {
         var parseArgs = new ParseUpdateInfoEventArgs(appCast.RemoteData);
         CallSync(s => parseUpdateInfoHandler((ParseUpdateInfoEventArgs)s), parseArgs);
         info = parseArgs.UpdateInfo;
         Logger.Info(States.AppCastCustomInfoParseEventDone);
     }
     catch (Exception e)
     {
         throw new UpdaterException(States.AppCastCustomInfoParseEventError, exception: e);
     }
 }
Exemple #2
0
 private void ExecuteUpdateXmlInfoParse(AppCast appCast, out UpdateInfoEventArgs info)
 {
     info = null;
     try
     {
         var appCastXmlDoc = new XmlDocument();
         appCastXmlDoc.LoadXml(appCast.RemoteData);
         var appCastItems = appCastXmlDoc.SelectNodes("item");
         if (appCastItems == null)
         {
             return;
         }
         info = new UpdateInfoEventArgs();
         foreach (XmlNode item in appCastItems)
         {
             ParseAppCastXmlInfo(item, info);
         }
         Logger.Info(States.AppCastXmlInfoParseDone);
     }
     catch (Exception exc)
     {
         throw new UpdaterException(States.AppCastXmlInfoParseError, exception: exc);
     }
 }