Example #1
0
            //Tell mailing list that I've sent them a message
            public void notify()
            {
                //create temp customEvent
                EventHandler <CustomEventAgs> handle = customEvent;

                //check to ensure receipients have subscribbed to user, if not, than ignore
                if (handle != null)
                {
                    //Assign Message to Envelope
                    CustomEventAgs args = new CustomEventAgs(post);
                    //Call Event Method -> EventMethodName(object sender, EventArgs e)
                    handle(this, args);
                }
            }
Example #2
0
 //I got a notification from someone I subscribe to
 public void HandleEvent(object sender, CustomEventAgs e)
 {
     Console.WriteLine("\t{0}'s update from {1}", ID, e.message);
 }