Method | Description | |
---|---|---|
DownloadDataTaskAsync ( this webClient, |
Asynchronously downloads the resource with the specified URI as a Byte array and allows cancelling the operation. Note that this overload specifies an infinite timeout.
|
|
DownloadDataTaskAsync ( this webClient, |
Asynchronously downloads the resource with the specified URI as a Byte array limited by the specified timeout.
|
|
DownloadDataTaskAsync ( this webClient, |
Asynchronously downloads the resource with the specified URI as a Byte array limited by the specified timeout and allows cancelling the operation.
|
Method | Description | |
---|---|---|
WebClientExtension ( ) : System |
Static constructor.
|
public static DownloadDataTaskAsync ( this webClient, |
||
webClient | this | The client with which to download the specified resource. |
uri | The address of the resource to download. | |
token | A cancellation token that can be used to cancel the pending asynchronous task. | |
return | Task |
public static DownloadDataTaskAsync ( this webClient, |
||
webClient | this | The client with which to download the specified resource. |
uri | The address of the resource to download. | |
timeout | System.TimeSpan | A TimeSpan specifying the amount of time to wait for a response before aborting the request. /// The specify an infinite timeout, pass a TimeSpan with a TotalMillisecond value of Timeout.Infinite. /// When a request is aborted due to a timeout the returned task will transition to the Faulted state with a TimeoutException. |
return | Task |
public static DownloadDataTaskAsync ( this webClient, |
||
webClient | this | The client with which to download the specified resource. |
uri | The address of the resource to download. | |
timeout | System.TimeSpan | A TimeSpan specifying the amount of time to wait for a response before aborting the request. /// The specify an infinite timeout, pass a TimeSpan with a TotalMillisecond value of Timeout.Infinite. /// When a request is aborted due to a timeout the returned task will transition to the Faulted state with a TimeoutException. |
token | A cancellation token that can be used to cancel the pending asynchronous task. | |
return | Task |