共用方式為


NSUrlSession.CreateDownloadTask 方法

定義

多載

CreateDownloadTask(NSData)

建立先前已取消或失敗下載的下載工作。

CreateDownloadTask(NSUrl)
CreateDownloadTask(NSUrlRequest)
CreateDownloadTask(NSUrl, NSUrlDownloadSessionResponse)
CreateDownloadTask(NSUrlRequest, NSUrlDownloadSessionResponse)

CreateDownloadTask(NSData)

建立先前已取消或失敗下載的下載工作。

[Foundation.Export("downloadTaskWithResumeData:")]
public virtual Foundation.NSUrlSessionDownloadTask CreateDownloadTask (Foundation.NSData resumeData);
abstract member CreateDownloadTask : Foundation.NSData -> Foundation.NSUrlSessionDownloadTask
override this.CreateDownloadTask : Foundation.NSData -> Foundation.NSUrlSessionDownloadTask

參數

resumeData
NSData

傳回

屬性

適用於

CreateDownloadTask(NSUrl)

[Foundation.Export("downloadTaskWithURL:")]
public virtual Foundation.NSUrlSessionDownloadTask CreateDownloadTask (Foundation.NSUrl url);
abstract member CreateDownloadTask : Foundation.NSUrl -> Foundation.NSUrlSessionDownloadTask
override this.CreateDownloadTask : Foundation.NSUrl -> Foundation.NSUrlSessionDownloadTask

參數

url
NSUrl

傳回

屬性

適用於

CreateDownloadTask(NSUrlRequest)

[Foundation.Export("downloadTaskWithRequest:")]
public virtual Foundation.NSUrlSessionDownloadTask CreateDownloadTask (Foundation.NSUrlRequest request);
abstract member CreateDownloadTask : Foundation.NSUrlRequest -> Foundation.NSUrlSessionDownloadTask
override this.CreateDownloadTask : Foundation.NSUrlRequest -> Foundation.NSUrlSessionDownloadTask

參數

request
NSUrlRequest

傳回

屬性

適用於

CreateDownloadTask(NSUrl, NSUrlDownloadSessionResponse)

[Foundation.Export("downloadTaskWithURL:completionHandler:")]
public virtual Foundation.NSUrlSessionDownloadTask CreateDownloadTask (Foundation.NSUrl url, Foundation.NSUrlDownloadSessionResponse completionHandler);
abstract member CreateDownloadTask : Foundation.NSUrl * Foundation.NSUrlDownloadSessionResponse -> Foundation.NSUrlSessionDownloadTask
override this.CreateDownloadTask : Foundation.NSUrl * Foundation.NSUrlDownloadSessionResponse -> Foundation.NSUrlSessionDownloadTask

參數

url
NSUrl
completionHandler
NSUrlDownloadSessionResponse

即將加入。

這個參數可以是 null

傳回

屬性

適用於

CreateDownloadTask(NSUrlRequest, NSUrlDownloadSessionResponse)

[Foundation.Export("downloadTaskWithRequest:completionHandler:")]
public virtual Foundation.NSUrlSessionDownloadTask CreateDownloadTask (Foundation.NSUrlRequest request, Foundation.NSUrlDownloadSessionResponse completionHandler);
abstract member CreateDownloadTask : Foundation.NSUrlRequest * Foundation.NSUrlDownloadSessionResponse -> Foundation.NSUrlSessionDownloadTask
override this.CreateDownloadTask : Foundation.NSUrlRequest * Foundation.NSUrlDownloadSessionResponse -> Foundation.NSUrlSessionDownloadTask

參數

request
NSUrlRequest
completionHandler
NSUrlDownloadSessionResponse

即將加入。

這個參數可以是 null

傳回

屬性

適用於