private BoardReport _passWorkToMembers(Hour currentHour) { BoardReport report = new BoardReport(_members); WorkCase workCase; WorkReport workReport; foreach (Member member in _members) { workCase = _registrar.GetMemberWork(currentHour, member); workReport = (workCase == null) ? new NullWorkReport() : workCase.Work(currentHour, member); report.Add(member, workReport); } return(report); }
internal override WorkCase GetMemberWork(Hour currentHour, Member member) { if (_memberHasOP(currentHour, member)) { return(_opSchedule.GetOPWork(currentHour, member)); } if (_decisionQueues[member].Count > 0) { return(_decisionQueues[member].Peek()); } if (_summonsQueues[member].Count > 0) { return(_summonsQueues[member].Peek()); } return(null); }
internal void LogFinished(Hour hour, WorkCase workCase, CaseWorker worker) { }
internal abstract void CirculateCases(Hour currentHour);
internal void LogStarted(Hour hour, WorkCase workCase, CaseWorker worker) { }
internal abstract void LogEnqueued(Hour currentHour);
internal abstract void ProcessFinishedCase(Hour currentHour, Registrar registrar);
internal void LogStarted(Hour hour, SummonsCase workCase, RapporteurWorker worker) { _checkIsNotAlreadyLogged(SummonsStartedRapporteur); SummonsStartedRapporteur = hour; }
internal override void ProcessFinishedCase(Hour currentHour, Registrar registrar) { registrar.ScheduleOP(currentHour, _case, _caseBoard); }
internal void LogFinished(Hour hour, OPCase workCase, SecondWorker worker) { _checkIsNotAlreadyLogged(OPFinishedSecondMember); OPFinishedSecondMember = hour; }
internal void LogFinished(Hour hour, DecisionCase workCase, ChairWorker worker) { _checkIsNotAlreadyLogged(DecisionFinishedChair); DecisionFinishedChair = hour; }
internal void LogFinished(Hour hour, OPCase workCase, ChairWorker worker) { _checkIsNotAlreadyLogged(OPFinishedChair); OPFinishedChair = hour; }
internal void LogFinished(Hour hour, OPCase workCase, RapporteurWorker worker) { _checkIsNotAlreadyLogged(OPFinishedRapporteur); OPFinishedRapporteur = hour; }
internal abstract void UpdateQueuesAndCirculate(Hour currentHour);
internal abstract void ScheduleOP(Hour currentHour, AppealCase appealCase, CaseBoard workers);
internal abstract WorkCase GetMemberWork(Hour currentHour, Member member);
internal void LogEnqueued(Hour hour, SummonsCase workCase, SecondWorker worer) { _checkIsNotAlreadyLogged(SummonsEnqueuedSecondMember); SummonsEnqueuedSecondMember = hour; }
internal void LogFinished(Hour hour, DecisionCase workCase, RapporteurWorker worker) { _checkIsNotAlreadyLogged(DecisionFinishedRapporteur); DecisionFinishedRapporteur = hour; }
internal void LogStarted(Hour hour, SummonsCase workCase, ChairWorker worker) { _checkIsNotAlreadyLogged(SummonsStartedChair); SummonsStartedChair = hour; }
internal void LogFinished(Hour hour, DecisionCase workCase, SecondWorker worer) { _checkIsNotAlreadyLogged(DecisionFinishedSecondMember); DecisionFinishedSecondMember = hour; }
internal override void LogEnqueued(Hour currentHour) => Log.LogEnqueued(currentHour, this as dynamic, _currentWorker as dynamic);
internal void LogFinished(Hour hour) { _checkIsNotAlreadyLogged(Finished); Finished = hour; }
internal override void ProcessFinishedCase(Hour currentHour, Registrar registrar) { WorkCase decisionCase = new DecisionCase(_case, _caseBoard); registrar.AddToDecisionCirculation(decisionCase); }
internal abstract void ProcessNewCase(AppealCase appealCase, Hour currentHour);
internal abstract WorkReport Work(Hour currentHour, Member member);
private bool _memberHasOP(Hour currentHour, Member member) { return(_opSchedule.HasOPWork(currentHour, member)); }
private void _checkIsNotAlreadyLogged(Hour logEntry) { if (logEntry != null) throw new InvalidOperationException("Entry has already been logged."); }
private void _updateOPSchedule(Hour currentHour) { _opSchedule.UpdateSchedule(currentHour); }
internal abstract BoardReport DoWork(Hour currentHour);
internal void LogEnqueued(Hour hour, WorkCase workCase, CaseWorker worker) { }