Exemplo n.º 1
0
 /// <summary>
 ///     Opens elevator door
 /// </summary>
 public void Open()
 {
     if (CurrentFloor == TargetFloor)
     {
         SetState(ElevatorStateFactory.CreateOpened(_elevatorStateObservable, LoadUnloadTime));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Normally we cannot enter the same state two or more times. In this case we break this rule. We force opened state
 ///     again even before already was opened state
 /// </summary>
 public void RefreshOpen()
 {
     SetState(ElevatorStateFactory.CreateOpened(_elevatorStateObservable, LoadUnloadTime), true);
 }