public override void Handle(StateContext stateContext) { if (this._clockHour >= 19) { Console.WriteLine("Self-owned space!!!"); } }
public override void Handle(StateContext stateContext) { if (this._clockHour >= 14 && this._clockHour < 19) { Console.WriteLine("Full of energy to work!!!"); } else { stateContext._state = new NightState(this._clockHour); stateContext.Request(); } }
public override void Handle(StateContext stateContext) { if (this._clockHour < 12) { Console.WriteLine("A lot of meetings to attend!"); } else { stateContext._state = new NoonState(this._clockHour); stateContext.Request(); } }
public override void Handle(StateContext stateContext) { if (this._clockHour >= 12 && this._clockHour < 14) { Console.WriteLine("It's a really hungry and sleepy time"); } else { stateContext._state = new AfternoonState(this._clockHour); stateContext.Request(); } }
public abstract void Handle(StateContext stateContext);