Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DownloadDataTaskAsync() [2/2]

Task< byte[]> System.Net.WebClient.DownloadDataTaskAsync ( Uri address)
inline

Definition at line 1949 of file WebClient.cs.

1950 {
1952 DownloadDataCompletedEventHandler handler = null;
1953 handler = delegate(object sender, DownloadDataCompletedEventArgs e)
1954 {
1955 HandleCompletion(tcs, e, (DownloadDataCompletedEventArgs args) => args.Result, handler, delegate(WebClient webClient, DownloadDataCompletedEventHandler completion)
1956 {
1957 webClient.DownloadDataCompleted -= completion;
1958 });
1959 };
1960 DownloadDataCompleted += handler;
1961 try
1962 {
1963 DownloadDataAsync(address, tcs);
1964 }
1965 catch
1966 {
1967 DownloadDataCompleted -= handler;
1968 throw;
1969 }
1970 return tcs.Task;
1971 }
void DownloadDataAsync(Uri address)
DownloadDataCompletedEventHandler? DownloadDataCompleted
Definition WebClient.cs:255
delegate void DownloadDataCompletedEventHandler(object sender, DownloadDataCompletedEventArgs e)

References System.Net.WebClient.DownloadDataAsync(), System.Net.WebClient.DownloadDataCompleted, System.Net.DownloadDataCompletedEventHandler(), System.Net.DownloadDataCompletedEventArgs.Result, and System.Threading.Tasks.TaskCompletionSource< TResult >.Task.