Battlelogium.Installer.InstallerCommon.GetDownload C# (CSharp) 메소드

GetDownload() 공개 정적인 메소드

public static GetDownload ( string dependency ) : Task
dependency string
리턴 Task
        public static async Task<string> GetDownload(string dependency)
        {
            string url = await new WebClient().DownloadStringTaskAsync("http://battlelogium.github.io/Battlelogium/releaseinfo/download/" + dependency);
            return url;
        }

Usage Example

예제 #1
0
        public async Task InstallDependency(string downloadKey, string labelName)
        {
            string originDownloadUrl = await InstallerCommon.GetDownload(downloadKey);

            this.SetStatusLabelSync("Downloading " + labelName + ". Please wait...");
            await downloader.DownloadFileTaskAsync(originDownloadUrl, Path.Combine(this.tempPath, downloadKey + "_inst.exe"));

            this.SetStatusLabelSync("Installing " + labelName + ". Please wait...");
            await Task.Run(() => {
                try
                {
                    Process.Start(Path.Combine(this.tempPath, downloadKey + "_inst.exe"), "/s").WaitForExit();
                }
                catch
                {
                    return;
                }
            });
        }
All Usage Examples Of Battlelogium.Installer.InstallerCommon::GetDownload