예제 #1
0
파일: Program.cs 프로젝트: CSharpDev/Csharp
        static void Main()
        {
            var dealer = new CarDealer();

            var michael = new Consumer("Michael");

            WeakCarInfoEventManager.AddListener(dealer, michael);

            dealer.NewCar("Mercedes");

            var nick = new Consumer("Nick");

            WeakCarInfoEventManager.AddListener(dealer, nick);

            dealer.NewCar("Ferrari");

            WeakCarInfoEventManager.RemoveListener(dealer, michael);

            dealer.NewCar("Toyota");
            System.Console.ReadKey();
        }
예제 #2
0
 private static void GetCurrentManager(Type type, WeakCarInfoEventManager manager)
 {
     throw new NotImplementedException();
 }