Ejemplo n.º 1
0
        IHttpTask CreateTask(TaskConfiguration config, bool upload, string identifier)
        {
            var task = new HttpTask(config, upload, identifier);

            task.PropertyChanged += this.OnTaskStatusChanged;
            this.Add(task);
            this.conn.Commit();

            return(task);
        }
Ejemplo n.º 2
0
        public override IHttpTask Download(TaskConfiguration config)
        {
            var request = this.CreateRequest(config);
            var native  = this.session.CreateDownloadTask(request);
            var task    = new HttpTask(config, native);

            this.Add(task);
            native.Resume();

            return(task);
        }
Ejemplo n.º 3
0
        public override IHttpTask Upload(TaskConfiguration config)
        {
            var request = this.CreateRequest(config);
            var native  = this.session.CreateUploadTask(request, NSUrl.FromFilename(config.LocalFilePath));
            var task    = new HttpTask(config, native);

            this.Add(task);
            native.Resume();

            return(task);
        }