コード例 #1
0
 private bool RaiseBackroundTaskStarted(ThreadWorkerTaskBase task)
 {
     if (OnBackgroundTaskStarted != null)
     {
         ThreadWorkerProgressArgs args = new ThreadWorkerProgressArgs(task.TaskID, 1, 0, null, false, null);
         OnBackgroundTaskStarted(task.WorkerThread, args);
     }
     return(false);
 }
コード例 #2
0
 public TaskResultInfo(ThreadWorkerTaskBase task, ThreadWorkerProgressArgs args)
 {
     this.Task = task;
     this.Args = args;
 }
コード例 #3
0
        protected void RaiseBackgroundTaskFinished(ThreadWorkerTaskBase task, int total, int current, Exception error, object result)
        {
            ThreadWorkerProgressArgs args = new ThreadWorkerProgressArgs(task.TaskID, total, current, error, true, result);

            taskResultInfos.Enqueue(new TaskResultInfo(task, args));
        }