internal FileUpload (NSUrlRequest request, string uniqueId, string localFilePath, DateTime creationDate, FileUploadManager manager)
		{
			var requestCopy = (NSMutableUrlRequest)request.MutableCopy();

			// Add the unique ID to the headers of the request. When our upload delegate gets called,
			// we can acccess the request and from that get back to the FileUpload object.
			var existingHeaders = NSMutableDictionary.FromDictionary (request.Headers);
			existingHeaders.Add ((NSString)"fileupload_unique_id", (NSString)uniqueId);
			requestCopy.Headers = existingHeaders;

			this.Request = requestCopy;
			this.UniqueId = uniqueId;
			this.CreationDate = creationDate;
			this.Manager = manager;
			this.Progress = 0f;
			this.LocalFilePath = localFilePath;
			this.State = STATE.Stopped;
		}
 public FileUploadDelegate(FileUploadManager manager)
 {
     this.Manager = manager;
 }
 public FileUploadDelegate(FileUploadManager manager)
 {
     this.Manager = manager;
 }
Beispiel #4
0
        internal FileUpload(NSUrlRequest request, string uniqueId, string localFilePath, DateTime creationDate, FileUploadManager manager)
        {
            var requestCopy = (NSMutableUrlRequest)request.MutableCopy();

            // Add the unique ID to the headers of the request. When our upload delegate gets called,
            // we can acccess the request and from that get back to the FileUpload object.
            var existingHeaders = NSMutableDictionary.FromDictionary(request.Headers);

            existingHeaders.Add((NSString)"fileupload_unique_id", (NSString)uniqueId);
            requestCopy.Headers = existingHeaders;

            this.Request       = requestCopy;
            this.UniqueId      = uniqueId;
            this.CreationDate  = creationDate;
            this.Manager       = manager;
            this.Progress      = 0f;
            this.LocalFilePath = localFilePath;
            this.State         = STATE.Stopped;
        }