/// <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);
            }
        }
Exemple #2
0
 public void NotifyObserver(NotifyObject notifyObj)
 {
     //do nothing
 }
Exemple #3
0
 public override void NotifyObserver(NotifyObject notifyObj)
 {
 }
Exemple #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);