Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public UrlSessionDelegate (SimpleBackgroundTransferViewController controller)
this.controller = controller;
}

[Export ("URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:")]
public void DidWriteData (NSUrlSession session, NSUrlSessionDownloadTask downloadTask, long bytesWritten, long totalBytesWritten, long totalBytesExpectedToWrite)
{
Console.WriteLine ("Set Progress");
Expand Down Expand Up @@ -121,6 +122,7 @@ public void DidFinishDownloading (NSUrlSession session, NSUrlSessionDownloadTask
}
}

[Export ("URLSession:task:didCompleteWithError:")]
public void DidCompleteWithError (NSUrlSession session, NSUrlSessionTask task, NSError error)
{
Console.WriteLine ("DidComplete");
Expand All @@ -137,11 +139,13 @@ public void DidCompleteWithError (NSUrlSession session, NSUrlSessionTask task, N
controller.downloadTask = null;
}

[Export ("URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:")]
public void DidResume (NSUrlSession session, NSUrlSessionDownloadTask downloadTask, long resumeFileOffset, long expectedTotalBytes)
{
Console.WriteLine ("DidResume");
}

[Export ("URLSessionDidFinishEventsForBackgroundURLSession:")]
public void DidFinishEventsForBackgroundSession (NSUrlSession session)
{
using (AppDelegate appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate) {
Expand Down