예제 #1
0
        /// <summary>
        /// send a broadcast message in synchronous way
        /// </summary>
        /// <param name="type">message type</param>
        /// <param name="name">message name</param>
        /// <param name="body">message body</param>
        public void Send(string type, string name, object body)
        {
            NotifyObject obj = new NotifyObject();

            obj.Body = body;
            obj.Type = type;
            obj.Name = name;
            foreach (KeyValuePair <IObserver, IObserver> item in m_ObserverMap)
            {
                item.Value.NotifyObserver(obj);
            }
        }
예제 #2
0
 public void NotifyObserver(NotifyObject notifyObj)
 {
     //do nothing
 }
예제 #3
0
 public override void NotifyObserver(NotifyObject notifyObj)
 {
 }
예제 #4
0
 /// <summary>
 /// This function is used to receive notification message
 /// </summary>
 /// <param name="notifyObj">Notification message object</param>
 public abstract void NotifyObserver(NotifyObject notifyObj);