Exemple #1
0
        public TaskWorker(Task task)
        {
            _task = task;

            _client = new CustomWebClient();

            _worker = new BackgroundWorker();
            _worker.WorkerSupportsCancellation = true;
            _worker.DoWork += new DoWorkEventHandler(DoWork);
            _worker.RunWorkerAsync(this);
        }
Exemple #2
0
        public TaskWorker(Task task)
        {
            _task = task;

            _client = new CustomWebClient();

            _worker = new BackgroundWorker();
            _worker.WorkerSupportsCancellation = true;
            _worker.DoWork += new DoWorkEventHandler(DoWork);
            _worker.RunWorkerAsync(this);
        }