Esempio n. 1
0
        public TimeBatchViewRStream(
            TimeBatchViewFactory factory,
            AgentInstanceViewFactoryChainContext agentInstanceContext,
            TimePeriodProvide timePeriodProvide)
        {
            this.agentInstanceContext = agentInstanceContext.AgentInstanceContext;
            this.factory = factory;
            scheduleSlot = agentInstanceContext.StatementContext.ScheduleBucket.AllocateSlot();
            this.timePeriodProvide = timePeriodProvide;

            // schedule the first callback
            if (factory.isStartEager) {
                currentReferencePoint = agentInstanceContext.StatementContext.SchedulingService.Time;
                ScheduleCallback();
                isCallbackScheduled = true;
            }
        }
Esempio n. 2
0
        public TimeBatchView(
            TimeBatchViewFactory factory,
            AgentInstanceViewFactoryChainContext agentInstanceContext,
            ViewUpdatedCollection viewUpdatedCollection,
            TimePeriodProvide timePeriodProvide)
        {
            _agentInstanceContext = agentInstanceContext.AgentInstanceContext;
            _factory = factory;
            _viewUpdatedCollection = viewUpdatedCollection;
            _scheduleSlot = agentInstanceContext.StatementContext.ScheduleBucket.AllocateSlot();
            _timePeriodProvide = timePeriodProvide;

            // schedule the first callback
            if (factory.isStartEager) {
                if (_currentReferencePoint == null) {
                    _currentReferencePoint = agentInstanceContext.StatementContext.SchedulingService.Time;
                }

                ScheduleCallback();
                _isCallbackScheduled = true;
            }
        }