Beispiel #1
0
 NSUrlDownloadSessionResponse GetCompletionHandler(NSUrlSessionResponse completionHandler)
 {
     if (completionHandler == null)
         return null;
     // we can't return an NSData so we return null - just in case existing code did not use it (e.g. only error)
     return delegate (NSUrl location, NSUrlResponse response, NSError error) {
         completionHandler (null, response, error);
     };
 }
 NSUrlDownloadSessionResponse GetCompletionHandler(NSUrlSessionResponse completionHandler)
 {
     if (completionHandler == null)
     {
         return(null);
     }
     // we can't return an NSData so we return null - just in case existing code did not use it (e.g. only error)
     return(delegate(NSUrl location, NSUrlResponse response, NSError error) {
         completionHandler(null, response, error);
     });
 }
 public override NSUrlSessionUploadTask CreateUploadTask(NSUrlRequest request, NSUrl fileURL, NSUrlSessionResponse completionHandler)
 {
     throw new NotSupportedException("NS_UNAVAILABLE");
 }
 public override NSUrlSessionDataTask CreateDataTask(NSUrl url, NSUrlSessionResponse completionHandler)
 {
     throw new NotSupportedException("NS_UNAVAILABLE");
 }
Beispiel #5
0
 public override NSUrlSessionUploadTask CreateUploadTask(NSUrlRequest request, NSData bodyData, NSUrlSessionResponse completionHandler)
 {
     throw new NotImplementedException();
 }
Beispiel #6
0
 public override NSUrlSessionDataTask CreateDataTask(NSUrl url, NSUrlSessionResponse completionHandler)
 {
     throw new NotImplementedException();
 }
 public virtual NSUrlSessionDownloadTask CreateDownloadTaskFromResumeData(NSData resumeData, NSUrlSessionResponse completionHandler)
 {
     return(CreateDownloadTaskFromResumeData(resumeData, GetCompletionHandler(completionHandler)));
 }
 public virtual NSUrlSessionDownloadTask CreateDownloadTask(NSUrl url, NSUrlSessionResponse completionHandler)
 {
     return(CreateDownloadTask(url, GetCompletionHandler(completionHandler)));
 }
Beispiel #9
0
 public override NSUrlSessionDataTask CreateDataTask(NSUrl url, NSUrlSessionResponse completionHandler)
 {
     throw new NotSupportedException ("NS_UNAVAILABLE");
 }
Beispiel #10
0
 public override NSUrlSessionUploadTask CreateUploadTask(NSUrlRequest request, NSData bodyData, NSUrlSessionResponse completionHandler)
 {
     throw new NotSupportedException ("NS_UNAVAILABLE");
 }
Beispiel #11
0
 public virtual NSUrlSessionDownloadTask CreateDownloadTaskFromResumeData(NSData resumeData, NSUrlSessionResponse completionHandler)
 {
     return CreateDownloadTaskFromResumeData (resumeData, GetCompletionHandler (completionHandler));
 }
Beispiel #12
0
 public virtual NSUrlSessionDownloadTask CreateDownloadTask(NSUrl url, NSUrlSessionResponse completionHandler)
 {
     return CreateDownloadTask (url, GetCompletionHandler (completionHandler));
 }