Пример #1
0
        static void Main(string[] args)
        {
            ProviderA room = new ProviderA();

            Subscriber John     = new Subscriber("John");
            Subscriber Alice    = new Subscriber("Alice");
            Subscriber Margaret = new Subscriber("Margaret");
            Moderator  Claire   = new Moderator("Claire");

            room.AddPerson(John);
            room.AddPerson(Alice);
            room.AddPerson(Margaret);
            room.AddPerson(Claire);

            //room.Broadcast(Claire, "Merhabalar");
            Claire.Broadcast("merhabalar");             // alternatif
        }