Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            EventGenerator eventGenerator = new EventGenerator();
            eventSender = eventGenerator;
            eventSender.Completed += SendCompleted;

            eventReveiver = eventGenerator;
            eventReveiver.Completed += ReceiveCompleted;

            StringEventArgs stringEventArg = new StringEventArgs("john");

            eventReveiver.TriggerEvent(stringEventArg);

            eventSender.TriggerEvent(stringEventArg);
            Console.ReadLine();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            EventGenerator eventGenerator = new EventGenerator();

            eventSender            = eventGenerator;
            eventSender.Completed += SendCompleted;

            eventReveiver            = eventGenerator;
            eventReveiver.Completed += ReceiveCompleted;

            StringEventArgs stringEventArg = new StringEventArgs("john");

            eventReveiver.TriggerEvent(stringEventArg);

            eventSender.TriggerEvent(stringEventArg);
            Console.ReadLine();
        }