예제 #1
0
        static void Main(string[] args)
        {
            DogDoor door = new DogDoor();
            Thread  test = new Thread(DogStop);

            door.AddAllowedBrak(new Bark("rowlf"));
            door.AddAllowedBrak(new Bark("roowlf"));
            door.AddAllowedBrak(new Bark("rawlf"));
            door.AddAllowedBrak(new Bark("woof"));

            BarkRecognzition recogniztion = new BarkRecognzition(door);
            Remote           remote       = new Remote(door);

            Console.WriteLine("Dog started barking...!!");
            recogniztion.Recognize(new Bark("rowlf"));

            Console.WriteLine("Dog goes outside!!!");
            test.Start();
            Console.WriteLine("Dog comes inside");
        }
예제 #2
0
 public Remote(DogDoor door)
 {
     this._door = door;
 }
예제 #3
0
 public BarkRecognzition(DogDoor door)
 {
     _door = door;
 }