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