Exemplo n.º 1
0
 public void TriggerEvent(StringEventArgs m)
 {
     if (Completed != null)
     {
         Completed(this,m);
     }
 }
Exemplo 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();
        }
Exemplo n.º 3
0
 static void SendCompleted(object sender, StringEventArgs m)
 {
     Console.WriteLine(m.EventParameter + " Send Completed");
 }
Exemplo n.º 4
0
 static void SendCompleted(object sender, StringEventArgs m)
 {
     Console.WriteLine(m.EventParameter + " Send Completed");
 }