예제 #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");
#if false
                newInfo.ImageAddress     = updateFile.GetUri("imgURL");
                newInfo.ImageLinkAddress = updateFile.GetUri("imgURLLink");
#endif
#if !PORTABLE
                newInfo.CertificateThumbprint = updateFile.GetThumbprint();
#endif
                newInfo.FileName = updateFile.GetFileName();
                newInfo.Checksum = updateFile.GetChecksum();
                newInfo.IsValid  = newInfo.CheckIfValid();
            }

            return(newInfo);
        }
예제 #2
0
        public static AnnouncementInfo FromString(string input)
        {
            AnnouncementInfo newInfo = new AnnouncementInfo();

            if (string.IsNullOrEmpty(input))
            {
                newInfo.IsValid = false;
            }
            else
            {
                UpdateFile updateFile = new UpdateFile(input);
                newInfo.Name    = updateFile.GetString("Name");
                newInfo.Address = updateFile.GetUri("URL");
                newInfo.IsValid = true;
            }
            return(newInfo);
        }
예제 #3
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("Version");
                newInfo.DownloadAddress       = updateFile.GetUri("dURL");
                newInfo.ChangeLogAddress      = updateFile.GetUri("clURL");
                newInfo.ImageAddress          = updateFile.GetUri("imgURL");
                newInfo.ImageLinkAddress      = updateFile.GetUri("imgURLLink");
                newInfo.CertificateThumbprint = updateFile.GetThumbprint("CertificateThumbprint");
                newInfo.IsValid               = true;
            }
            return(newInfo);
        }
예제 #4
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;
 }