/// <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++; } } }
/// <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; } }
/// <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++; } } }
/// <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); } }