GetUri() public method

public GetUri ( string key ) : Uri
key string
return System.Uri
示例#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 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);
        }
示例#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();
         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;
 }
示例#4
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);
        }