Esempio n. 1
0
        public void EndMusicConcert()
        {
            // Handle the end of broadcasting of a musci concert...
            // ...
            // ...
            // lastly add back news updates after concert
            subject.AddObserver(this);
            var color = Console.ForegroundColor;

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine(" <----------------- End of Music concert --------------> ");
            Console.ForegroundColor = color;
        }
Esempio n. 2
0
 public NewsChannel1(NewsAgency agency)
 {
     agency.AddObserver(this);
 }
 public SportsChannel(NewsAgency agency)
 {
     agency.AddObserver(this);
 }
Esempio n. 4
0
 public MusicNowChannel(NewsAgency agency)
 {
     subject = agency;
     subject.AddObserver(this);
 }