예제 #1
0
        internal void Enqueue(AppealCase appealCase)
        {
            if (appealCase.Stage == AppealCaseState.Stage.New)
            {
                appealCase.AdvanceState();
            }

            switch (appealCase.Stage)
            {
            case AppealCaseState.Stage.SummonsEnqueued:
            case AppealCaseState.Stage.SummonsStarted:
            case AppealCaseState.Stage.SummonsFinished:
                _summonsQueue.Enqueue(appealCase);
                break;

            case AppealCaseState.Stage.DecisionEnqueued:
            case AppealCaseState.Stage.DecisionStarted:
            case AppealCaseState.Stage.DecisionFinished:
                _decisionQueue.Enqueue(appealCase);
                break;

            default:
                throw new InvalidOperationException("Appeal is not in Summons or Decision stage.");
            }
        }
예제 #2
0
        internal BoardLog DoWork()
        {
            _processCirculatingCases();
            _processIncomingCases();

            BoardLog log = new BoardLog();

            foreach (Member m in _members())
            {
                WorkReport report = m.DoWork();
                log.Add(m, report);

                if (report.State == Work.WorkState.Finished)
                {
                    AppealCase appealCase = report.Case;
                    _circulatingCases.Enqueue(appealCase);
                }
            }

            return(log);
        }
예제 #3
0
 internal void EnqueueNewCase(AppealCase appealCase)
 {
     _incomingCases.Enqueue(appealCase);
 }