예제 #1
0
        /// <summary>
        /// Generates requests
        /// </summary>
        public override void Process()
        {
            if (ProcessingRequest != null || RequestCreated())
            {
                Request request = ProcessingRequest ?? new Request {
                    CreationTact = _massServiceSystem.Tact, ExistingTime = 0
                };
                IComponent nextComponent = NextComponents.FirstOrDefault(component => component.ProcessingRequest == null);

                if (request != ProcessingRequest)
                {
                    _massServiceSystem.Requests.Add(request);
                }

                if (nextComponent == null)
                {
                    request.State     = RequestState.Pending;
                    ProcessingRequest = request;
                }
                else
                {
                    request.State = RequestState.Processing;
                    nextComponent.ProcessingRequest = request;
                    ProcessingRequest = null;
                }

                if (ProcessingRequest != null && ProcessingRequest.State == RequestState.Pending)
                {
                    TactsSourceBlocked++;
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Process request
        /// </summary>
        public override void Process()
        {
            if (ProcessingRequest != null && RequestProcessed())
            {
                IComponent nextComponent =
                    NextComponents.FirstOrDefault(component => component.ProcessingRequest == null);

                if (nextComponent == null)
                {
                    ProcessingRequest.State = RequestState.Discarded;
                }
                else
                {
                    nextComponent.ProcessingRequest = ProcessingRequest;
                }

                ProcessingRequest = null;
            }
        }
예제 #3
0
        /// <summary>
        /// Process request
        /// </summary>
        public override void Process()
        {
            if (ProcessingRequest != null && (ProcessingRequest.State == RequestState.Pending || RequestProcessed()))
            {
                IComponent nextComponent = NextComponents.FirstOrDefault(component => component.ProcessingRequest == null);

                if (nextComponent == null)
                {
                    ProcessingRequest.State = RequestState.Pending;
                }
                else
                {
                    ProcessingRequest.State         = RequestState.Processing;
                    nextComponent.ProcessingRequest = ProcessingRequest;
                    ProcessingRequest = null;
                }

                if (ProcessingRequest != null && ProcessingRequest.State == RequestState.Pending)
                {
                    TactsChannelBlocked++;
                }
            }
        }
예제 #4
0
        /// <summary>
        /// Generates requests
        /// </summary>
        public override void Process()
        {
            if (RequestCreated())
            {
                Request request = new Request {
                    CreationTact = _massServiceSystem.Tact, ExistingTime = 0
                };
                IComponent nextComponent =
                    NextComponents.FirstOrDefault(component => component.ProcessingRequest == null);

                if (nextComponent == null)
                {
                    request.State = RequestState.Discarded;
                }
                else
                {
                    request.State = RequestState.Processing;
                    nextComponent.ProcessingRequest = request;
                }

                _massServiceSystem.Requests.Add(request);
            }
        }