Exemple #1
0
        protected virtual void OnRaiseCustomEvent(CustomEventAgrs e)
        {
            EventHandler <CustomEventAgrs> handler = RaiseCustomEvent;

            if (handler != null)
            {
                e.Message += string.Format("at {0}", DateTime.Now.ToString());
                handler(this, e);
            }
        }
Exemple #2
0
 void HandleCustomEvent(object sender, CustomEventAgrs e)
 {
     Console.WriteLine(id + " received this message: {0}", e.Message);
 }