public GraphWorker(IDepartment startDepartment, FinishDepartment finishDepartment, IDepartment targetDepartment) { _finishDepartment = finishDepartment; _stampList = new StampList(); _department = startDepartment; _targetDepartment = targetDepartment; _thread = new Thread(ThreadFunc) { IsBackground = true }; }
public IDepartment Perform(StampList stampList) => throw new Exception("Some kind of error in the library");
public IDepartment Perform(StampList stampList) => stampList.Contains(StampCondition) ? IfDepartment.Perform(stampList) : ElseDepartment.Perform(stampList);
public IDepartment Perform(StampList stampList) { stampList.AddStamp(NewStamp); stampList.DeleteStamp(DeleteStamp); return(NextDepartment); }