/// <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); } }
public void NotifyObserver(NotifyObject notifyObj) { //do nothing }
public override void NotifyObserver(NotifyObject notifyObj) { }
/// <summary> /// This function is used to receive notification message /// </summary> /// <param name="notifyObj">Notification message object</param> public abstract void NotifyObserver(NotifyObject notifyObj);