public void Show() { // Setup context in a state StateContext c = new StateContext(new ConcreteStateA()); // Issue requests, which toggles state c.Request(); c.Request(); c.Request(); c.Request(); }
public override void Handle(StateContext context) { context.State = new ConcreteStateA(); }
public abstract void Handle(StateContext context);