Edit

Share via


NSUrlSession.CreateDownloadTaskAsync Method

Definition

Overloads

CreateDownloadTaskAsync(NSUrl)
CreateDownloadTaskAsync(NSUrlRequest)
CreateDownloadTaskAsync(NSUrl, NSUrlSessionDownloadTask)

Downloads a url resource asynchronously to a temporary file.

CreateDownloadTaskAsync(NSUrlRequest, NSUrlSessionDownloadTask)

Downloads a url resource asynchronously to a temporary file.

CreateDownloadTaskAsync(NSUrl)

public virtual System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest> CreateDownloadTaskAsync (Foundation.NSUrl url);
abstract member CreateDownloadTaskAsync : Foundation.NSUrl -> System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest>
override this.CreateDownloadTaskAsync : Foundation.NSUrl -> System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest>

Parameters

url
NSUrl

Returns

A task that represents the asynchronous CreateDownloadTask operation.

Remarks

The downloaded content is stored in a temporary file, whose path is stored in the returned NSUrlSessionDownloadTaskRequest instance. Since this is a temporary file, it will be deleted once the NSUrlSessionDownloadTaskRequest instance is garbage collected (or disposed).

Applies to

CreateDownloadTaskAsync(NSUrlRequest)

public virtual System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest> CreateDownloadTaskAsync (Foundation.NSUrlRequest request);
abstract member CreateDownloadTaskAsync : Foundation.NSUrlRequest -> System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest>
override this.CreateDownloadTaskAsync : Foundation.NSUrlRequest -> System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest>

Parameters

request
NSUrlRequest

Returns

A task that represents the asynchronous CreateDownloadTask operation.

Remarks

The downloaded content is stored in a temporary file, whose path is stored in the returned NSUrlSessionDownloadTaskRequest instance. Since this is a temporary file, it will be deleted once the NSUrlSessionDownloadTaskRequest instance is garbage collected (or disposed).

Applies to

CreateDownloadTaskAsync(NSUrl, NSUrlSessionDownloadTask)

Downloads a url resource asynchronously to a temporary file.

public virtual System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest> CreateDownloadTaskAsync (Foundation.NSUrl url, out Foundation.NSUrlSessionDownloadTask result);
abstract member CreateDownloadTaskAsync : Foundation.NSUrl *  -> System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest>
override this.CreateDownloadTaskAsync : Foundation.NSUrl *  -> System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest>

Parameters

url
NSUrl

The url that specifies the resource to download.

result
NSUrlSessionDownloadTask

Upon return contains the NSUrlSessionDownloadTask for that was created.

Returns

A task that represents the asynchronous CreateDownloadTask operation.

Remarks

The downloaded content is stored in a temporary file, whose path is stored in the returned NSUrlSessionDownloadTaskRequest instance. Since this is a temporary file, it will be deleted once the NSUrlSessionDownloadTaskRequest instance is garbage collected (or disposed).

Applies to

CreateDownloadTaskAsync(NSUrlRequest, NSUrlSessionDownloadTask)

Downloads a url resource asynchronously to a temporary file.

public virtual System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest> CreateDownloadTaskAsync (Foundation.NSUrlRequest request, out Foundation.NSUrlSessionDownloadTask result);
abstract member CreateDownloadTaskAsync : Foundation.NSUrlRequest *  -> System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest>
override this.CreateDownloadTaskAsync : Foundation.NSUrlRequest *  -> System.Threading.Tasks.Task<Foundation.NSUrlSessionDownloadTaskRequest>

Parameters

request
NSUrlRequest

A url request that specifies the resource to download.

result
NSUrlSessionDownloadTask

Upon return contains the NSUrlSessionDownloadTask for that was created.

Returns

A task that represents the asynchronous CreateDownloadTask operation.

Remarks

The downloaded content is stored in a temporary file, whose path is stored in the returned NSUrlSessionDownloadTaskRequest instance. Since this is a temporary file, it will be deleted once the NSUrlSessionDownloadTaskRequest instance is garbage collected (or disposed).

Applies to