示例#1
0
        SdpArchive GetFileList()
        {
            SdpArchive fileList;

            tempFilelist = GetTempFileName();
            fileListWebGet.Start(urlRoot + "/packages/" + PackageHash + ".sdp");
            fileListWebGet.WaitHandle.WaitOne();

            if (fileListWebGet.Result != null)
            {
                File.WriteAllBytes(tempFilelist, fileListWebGet.Result);
                using (var fs = new FileStream(tempFilelist, FileMode.Open)) fileList = new SdpArchive(new GZipStream(fs, CompressionMode.Decompress));
            }
            else
            {
                throw new ApplicationException("FileList has download failed");
            }
            return(fileList);
        }