Пример #1
0
 public static UpdateInfo FromString(string input)
 {
     var newInfo = new UpdateInfo();
     if (string.IsNullOrEmpty(input))
     {
         newInfo.IsValid = false;
     }
     else
     {
         var updateFile = new UpdateFile(input);
         newInfo.Version = updateFile.GetVersion();
         newInfo.DownloadAddress = updateFile.GetUri("dURL");
         newInfo.ChangeLogAddress = updateFile.GetUri("clURL");
         newInfo.ImageAddress = updateFile.GetUri("imgURL");
         newInfo.ImageLinkAddress = updateFile.GetUri("imgURLLink");
     #if !PORTABLE
         newInfo.CertificateThumbprint = updateFile.GetThumbprint();
     #endif
         newInfo.FileName = updateFile.GetFileName();
         newInfo.Checksum = updateFile.GetChecksum();
         newInfo.IsValid = true;
     }
     return newInfo;
 }