Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Context c = new Context(new ConcreteStateA());

            c.Request();
            c.Request();
            c.Request();
            c.Request();
            c.Request();

            //Example
            Work work = new Work();

            work.State = new PendingState();
            work.Start();
            work.Cancel();
            Console.ReadKey();
        }