public IEpsTask CreateTask(IEpsTaskConfig config)
        {
            Type taskType;

            switch (config.TaskExecutorType)
            {
            case EpsTaskExecutorTypes.PRINT:
                taskType = typeof(EpsTaskPrintExport);
                break;

            case EpsTaskExecutorTypes.MAIL:
                taskType = typeof(EpsTaskMailExport);
                break;

            case EpsTaskExecutorTypes.SHARE:
                taskType = typeof(EpsTaskShareExport);
                break;

            case EpsTaskExecutorTypes.FTP:
                taskType = typeof(EpsTaskFtpExport);
                break;

            default:
                throw new Exception(string.Format("Unknown Task type {0}.", config.TaskExecutorType));
            }

            return((IEpsTask)_container.Resolve(taskType, new ParameterOverride("config", config)));
        }
Exemple #2
0
 public EpsTaskMailExport(IEpsTaskConfig config,
                          IEpsConfiguration epsConfiguration,
                          Archiver archiver,
                          IEpsMailConfig mailConfig)
     : base(config, epsConfiguration, archiver)
 {
     Contract.Requires(mailConfig != null);
     _mailConfig = mailConfig;
 }
Exemple #3
0
        public EpsTask(IEpsTaskConfig config,
                       IEpsConfiguration epsConfiguration,
                       Archiver archiver)
        {
            Contract.Requires(config != null);
            Contract.Requires(epsConfiguration != null);
            Contract.Requires(archiver != null);

            Log               = LogManager.GetLogger(GetType());
            _config           = config;
            _epsConfiguration = epsConfiguration;
            _archiver         = archiver;

            CheckConfig();
        }
 public EpsTaskShareExport(IEpsTaskConfig config, IEpsConfiguration epsConfiguration, Archiver archiver)
     : base(config, epsConfiguration, archiver)
 {
 }
Exemple #5
0
 IEpsTask IEpsTaskFactory.CreateTask(IEpsTaskConfig config)
 {
     Contract.Requires(config != null);
     Contract.Ensures(Contract.Result <IEpsTask>() != null);
     throw new System.NotImplementedException();
 }