public OutputConditionPolledCrontab(
     AgentInstanceContext agentInstanceContext,
     OutputConditionPolledCrontabState state)
 {
     this._agentInstanceContext = agentInstanceContext;
     this._state = state;
 }
Esempio n. 2
0
        public OutputConditionPolled MakeNew(AgentInstanceContext agentInstanceContext)
        {
            ScheduleSpec scheduleSpec;
            try {
                var scheduleSpecParameterList = Evaluate(expressions, agentInstanceContext);
                scheduleSpec = ScheduleSpecUtil.ComputeValues(scheduleSpecParameterList);
            }
            catch (ScheduleParameterException e) {
                throw new ArgumentException("Invalid schedule specification : " + e.Message, e);
            }

            var state = new OutputConditionPolledCrontabState(scheduleSpec, null, 0);
            return new OutputConditionPolledCrontab(agentInstanceContext, state);
        }