Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Publisher   p1 = new Publisher();
            SubscriberA sA = new SubscriberA();
            SubscriberB sB = new SubscriberB();

            p1.Eveniment += new iteratie(sA.iteratie);
            p1.Eveniment += new iteratie(sB.iteratie);
            p1.DeclansareEveniment();
            Console.ReadKey();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Publisher   pb  = new Publisher();
            SubscriberA SBa = new SubscriberA();
            SubscriberB SBb = new SubscriberB();

            pb.eveniment += SBa.metodaClasaSubscriber;
            pb.eveniment += SBb.metodaClasaSubscriber;

            pb.DeclansareEveniment();

            Console.ReadKey();
        }