コード例 #1
0
 public override void CheckState()
 {
     if (_account.TotalDeposite > UpperLimit)
     {
         base._account.LevelState = StateFactory.GetState <StandartState>(base._account);
     }
 }
コード例 #2
0
 public override void CheckState()
 {
     if (_account.TotalDeposite < LowerLimit)
     {
         base._account.LevelState =
             StateFactory.GetState <OverDrawn>(base._account);
     }
     else if (_account.TotalDeposite > UpperLimit)
     {
         base._account.LevelState =
             StateFactory.GetState <PremiumState>(base._account);
     }
 }