Exemple #1
0
        public static void StatePatternMain()
        {
            StateContext context = new StateContext(new ConcreteStateA());

            context.Request();
            context.Request();
            context.Request();
            context.Request();
        }
Exemple #2
0
 public override void Handle(StateContext context)
 {
     context.State = new ConcreteStateA();
 }
Exemple #3
0
 public abstract void Handle(StateContext context);