示例#1
0
        protected void RaiseWorkerFault(TArg arg, Exception exception)
        {
            WorkerEventArgs <TArg, Exception> eventArgs = new WorkerEventArgs <TArg, Exception>(arg, exception);

            try { OnWorkerFault(eventArgs); }
            finally { WorkerFault?.Invoke(this, eventArgs); }
        }
示例#2
0
        protected void RaiseWorkerCanceled(TArg arg)
        {
            WorkerEventArgs <TArg> eventArgs = new WorkerEventArgs <TArg>(arg);

            try { OnWorkerCanceled(eventArgs); }
            finally { WorkerCanceled?.Invoke(this, eventArgs); }
        }
示例#3
0
        protected override void RaiseWorkerComplete(Task workerTask, TArg arg)
        {
            WorkerEventArgs <TArg> eventArgs = new WorkerEventArgs <TArg>(arg);

            try { OnWorkerComplete(eventArgs); }
            finally { WorkerComplete?.Invoke(this, eventArgs); }
        }
示例#4
0
 protected virtual void OnWorkerFault(WorkerEventArgs <TArg, Exception> args)
 {
 }
示例#5
0
 protected virtual void OnWorkerCanceled(WorkerEventArgs <TArg> args)
 {
 }
示例#6
0
 protected virtual void OnWorkerComplete(WorkerEventArgs <TArg> eventArgs)
 {
 }