Exemple #1
0
 public virtual void Uninit()
 {
     _logger.InfoFormat("Uninit, JobRunner = {0}, Job = {1}", this, this.Job);
     if (null != _jobRunnerStatusCallback)
     {
         _jobRunnerStatusCallback.OnJobUninit(this);
     }
     _jobRunnerStatusCallback = null;
 }
Exemple #2
0
        public virtual bool Init(IJobRunnerStatusCallback jobRunnerStatusCallback)
        {
            _logger.InfoFormat("Init, JobRunner = {0}, Job = {1}", this, this.Job);
            if (jobRunnerStatusCallback == null)
            {
                return(false);
            }

            if (null != _jobRunnerStatusCallback)
            {
                Uninit();
            }

            _jobRunnerStatusCallback = jobRunnerStatusCallback;
            if (null != _jobRunnerStatusCallback)
            {
                _jobRunnerStatusCallback.OnJobInit(this);
            }
            return(true);
        }