Пример #1
0
        public static void Run()
        {
            CeilingFanPullChain ceilingFanPullChain = new CeilingFanPullChain();

            for (int i = 0; i < 10; i++)
            {
                ceilingFanPullChain.Pull();
            }
        }
Пример #2
0
 public override void Pull(CeilingFanPullChain ceilingFanPullChain)
 {
     ceilingFanPullChain.CurrentState = new High();
     Console.WriteLine("High speed");
 }
Пример #3
0
 public override void Pull(CeilingFanPullChain ceilingFanPullChain)
 {
     ceilingFanPullChain.CurrentState = new Off();
     Console.WriteLine("Off");
 }
Пример #4
0
 public abstract void Pull(CeilingFanPullChain ceilingFanPullChain);