Esempio n. 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        protected JobContext([NotNull] PluginSettings pPluginSettings,
                             [CanBeNull] iDataSource pDataSource,
                             [NotNull] iEventFactory pEventFactory)
        {
            if (pPluginSettings == null)
            {
                throw new ArgumentNullException("pPluginSettings");
            }
            if (pEventFactory == null)
            {
                throw new ArgumentNullException("pEventFactory");
            }

            Source = pDataSource;
            PluginSettings = pPluginSettings;
            _eventFactory = pEventFactory;

            _eventRecorder = null;
        }
Esempio n. 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public Job(
            Guid pParentID,
            PluginSettings pSettings,
            string pPlugin,
            string pName,
            string pCode,
            iTaskCollection pTasks,
            iJobContextFactory pJobContextFactory,
            iEventFactory pEventFactory,
            iJobState pJobState,
            int pMaxErrors = 0)
        {
            _settings = pSettings;
            _jobContextFactory = pJobContextFactory;
            _jobState = pJobState;
            _eventDelay = new AutoResetEvent(false);

            _isRunning = false;
            _isSuspended = false;

            Tasks = pTasks;
            ParentID = pParentID;
            Plugin = pPlugin;
            Name = pName;
            Code = pCode;
            ID = Guid.NewGuid();
            State = eSTATE.NONE;

            _eventFactory = pEventFactory;

            Errors = 0;
            MaxErrors = pMaxErrors;
            TimeStamp = DateTime.Now;
            ThreadID = 0;
        }
Esempio n. 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 public EmailContextFactory(iEventFactory pEventFactory)
 {
     _eventFactory = pEventFactory;
 }
Esempio n. 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 public EmailContext(PluginSettings pPluginSettings, iEventFactory pEventFactory)
     : base(pPluginSettings, null, pEventFactory)
 {
 }