コード例 #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);
     };
 }
コード例 #2
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);
     });
 }
コード例 #3
0
 public override NSUrlSessionUploadTask CreateUploadTask(NSUrlRequest request, NSUrl fileURL, NSUrlSessionResponse completionHandler)
 {
     throw new NotSupportedException("NS_UNAVAILABLE");
 }
コード例 #4
0
 public override NSUrlSessionDataTask CreateDataTask(NSUrl url, NSUrlSessionResponse completionHandler)
 {
     throw new NotSupportedException("NS_UNAVAILABLE");
 }
コード例 #5
0
 public override NSUrlSessionUploadTask CreateUploadTask(NSUrlRequest request, NSData bodyData, NSUrlSessionResponse completionHandler)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
 public override NSUrlSessionDataTask CreateDataTask(NSUrl url, NSUrlSessionResponse completionHandler)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
 public virtual NSUrlSessionDownloadTask CreateDownloadTaskFromResumeData(NSData resumeData, NSUrlSessionResponse completionHandler)
 {
     return(CreateDownloadTaskFromResumeData(resumeData, GetCompletionHandler(completionHandler)));
 }
コード例 #8
0
 public virtual NSUrlSessionDownloadTask CreateDownloadTask(NSUrl url, NSUrlSessionResponse completionHandler)
 {
     return(CreateDownloadTask(url, GetCompletionHandler(completionHandler)));
 }
コード例 #9
0
 public override NSUrlSessionDataTask CreateDataTask(NSUrl url, NSUrlSessionResponse completionHandler)
 {
     throw new NotSupportedException ("NS_UNAVAILABLE");
 }
コード例 #10
0
 public override NSUrlSessionUploadTask CreateUploadTask(NSUrlRequest request, NSData bodyData, NSUrlSessionResponse completionHandler)
 {
     throw new NotSupportedException ("NS_UNAVAILABLE");
 }
コード例 #11
0
 public virtual NSUrlSessionDownloadTask CreateDownloadTaskFromResumeData(NSData resumeData, NSUrlSessionResponse completionHandler)
 {
     return CreateDownloadTaskFromResumeData (resumeData, GetCompletionHandler (completionHandler));
 }
コード例 #12
0
 public virtual NSUrlSessionDownloadTask CreateDownloadTask(NSUrl url, NSUrlSessionResponse completionHandler)
 {
     return CreateDownloadTask (url, GetCompletionHandler (completionHandler));
 }