public TaskWorker(Task task) { _task = task; _client = new CustomWebClient(); _worker = new BackgroundWorker(); _worker.WorkerSupportsCancellation = true; _worker.DoWork += new DoWorkEventHandler(DoWork); _worker.RunWorkerAsync(this); }