Exemplo n.º 1
0
        /// <summary>
        /// Constructor...
        /// </summary>
        /// <param name="threadClass">The thread class.</param>
        public ThreadHandler(IThreadClass threadClass)
        {
            _thread = new System.Threading.Thread(new System.Threading.ThreadStart(this.Worker));

            this.OnJob += new HandlerForOnJob(threadClass.OnJob);
            this.OnFinish += new HandlerForOnFinish(threadClass.OnFinish);
            this.OnAbort += new HandlerForOnAbort(threadClass.OnAbort);
            this.OnTerminate += new HandlerForOnTerminate(threadClass.OnTerminate);
            this.OnException += new HandlerForOnException(threadClass.OnException);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor...
        /// </summary>
        /// <param name="threadClass">The thread class.</param>
        public ThreadHandler(IThreadClass threadClass)
        {
            _thread = new System.Threading.Thread(new System.Threading.ThreadStart(this.Worker));

            this.OnJob       += new HandlerForOnJob(threadClass.OnJob);
            this.OnFinish    += new HandlerForOnFinish(threadClass.OnFinish);
            this.OnAbort     += new HandlerForOnAbort(threadClass.OnAbort);
            this.OnTerminate += new HandlerForOnTerminate(threadClass.OnTerminate);
            this.OnException += new HandlerForOnException(threadClass.OnException);
        }