static void Main(string[] args) { Context c = new Context(new ConcreteStateA()); c.Request(); c.Request(); c.Request(); c.Request(); Console.Read(); }
public abstract void Handle(Context context);
public override void Handle(Context context) { context.State = new ConcreteStateA(); }