OpenRA.Download.Download C# (CSharp) Method

Download() public method

public Download ( string url, Action onProgress, Action onComplete ) : System
url string
onProgress Action
onComplete Action
return System
        public Download(string url, Action<DownloadProgressChangedEventArgs> onProgress, Action<DownloadDataCompletedEventArgs> onComplete)
        {
            lock (syncObject)
            {
                wc = new WebClient { Proxy = null };
                wc.DownloadProgressChanged += (_, a) => onProgress(a);
                wc.DownloadDataCompleted += (_, a) => { DisposeWebClient(); onComplete(a); };
                wc.DownloadDataAsync(new Uri(url));
            }
        }

Same methods

Download::Download ( string url, string path, Action onProgress, Action onComplete ) : System