예제 #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);
        }
예제 #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);
        }