Example #1
0
        internal WorkerRole EnqueueForNextWorker(Hour currentHour, AllocatedCase allocatedCase)
        {
            CaseWorker nextWorker = null;

            if (_workerQueues[CaseStage.Summons].Count > 0)
            {
                nextWorker = _workerQueues[CaseStage.Summons].Dequeue();
            }
            else if (_workerQueues[CaseStage.Decision].Count > 0)
            {
                nextWorker = _workerQueues[CaseStage.Decision].Dequeue();
            }

            if (nextWorker == null)
            {
                return(WorkerRole.None);
            }

            _registrar.EnqueueForWorker(currentHour, nextWorker, allocatedCase);
            return(nextWorker.Role);
        }