Ejemplo n.º 1
0
        // downloads version configs of wanted versions (async)
        private void DownloadVersionConfigs(DelegateTransfer callback, List <string> updates, string fullVersion)
        {
            var files = new List <TransferFile>();

            // create list with paths of version configs
            foreach (string update in updates)
            {
                files.Add(new TransferFile(update + "/" + updateConfig));
            }
            files.Add(new TransferFile(fullVersion + "/" + fullVersionConfig));

            // try to download the version configs async
            fileTransfer.DownloadFilesAsync(files, false, remotePath, localPath,
                                            delegate(FileTransferResult result)
            {
                callback(result == FileTransferResult.Success);
            });
        }