Example #1
0
 /// <summary>
 /// Builds the job.
 /// </summary>
 /// <returns></returns>
 public IJob Build()
 {
     if (_builder != null)
     {
         return _builder.End().Build();
     }
     SimpleJob job = new SimpleJob(GetName());
     Enhance(job);
     job.Steps = _steps;
     try
     {
         job.AfterPropertiesSet();
     }
     catch (Exception e)
     {
         throw new JobBuilderException(e);
     }
     return job;
 }
        /// <summary>
        /// Builds the job.
        /// </summary>
        /// <returns></returns>
        public IJob Build()
        {
            if (_builder != null)
            {
                return(_builder.End().Build());
            }
            SimpleJob job = new SimpleJob(GetName());

            Enhance(job);
            job.Steps = _steps;
            try
            {
                job.AfterPropertiesSet();
            }
            catch (Exception e)
            {
                throw new JobBuilderException(e);
            }
            return(job);
        }