internal override WorkReport Work(Hour currentHour, Member member) { CaseWorker worker = _caseBoard.FirstOrDefault(x => x.Member == member); if (worker == null) { throw new InvalidOperationException($"{member} is not allocated to this case."); } if (_workerQueue.Count < 1) { throw new InvalidOperationException("No worker queued to do work."); } if (!_work[member].IsStarted) { Log.LogStarted(currentHour, this as dynamic, worker as dynamic); } if (_work[member].IsFinished) { return(new NullWorkReport()); } else { _work[member].DoWork(); if (_work[member].IsFinished) { Log.LogFinished(currentHour, this as dynamic, worker as dynamic); } return(new WorkReport(this as dynamic)); } }
internal void LogEnqueued(Hour hour, OPCase workCase, CaseWorker worker) { _checkIsNotAlreadyLogged(OPEnqueuedChair); _checkIsNotAlreadyLogged(OPEnqueuedRapporteur); _checkIsNotAlreadyLogged(OPEnqueuedSecondMember); OPEnqueuedChair = hour; OPEnqueuedRapporteur = hour; OPEnqueuedSecondMember = hour; }
protected abstract int _getWorkHours(CaseWorker worker);
protected override int _getWorkHours(CaseWorker worker) { return(worker.HoursOPPreparation + TimeParameters.OPDurationInHours); }
protected override int _getWorkHours(CaseWorker worker) { return(worker.HoursForDecision); }
protected override int _getWorkHours(CaseWorker worker) { return(worker.HoursForSummons); }
internal void LogFinished(Hour hour, WorkCase workCase, CaseWorker worker) { }
internal void LogStarted(Hour hour, WorkCase workCase, CaseWorker worker) { }
internal void LogEnqueued(Hour hour, WorkCase workCase, CaseWorker worker) { }