コード例 #1
0
        protected void NotifyObservers(OperationMessage message)
        {
            if (observerItems == null)
            {
                return;
            }

            foreach (var obItem in observerItems)
            {
                if (message.GetOperationType().Equals(obItem.OpType))
                {
                    NotifyObserver(message, obItem.Observer);
                }
            }
        }
コード例 #2
0
 public void SendMessage(OperationMessage message)
 {
     OnReceiveOperationMessage(message);
 }
コード例 #3
0
 // protected abstract List<OperationType> ParseOperationTypeOfObserver (IOperationObserver observer);
 protected abstract void NotifyObserver(OperationMessage message, IOperationObserver observer);
コード例 #4
0
 /// <summary>
 /// 解析分类message 子类重写
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="type"></param>
 /// <param name="message"></param>
 protected virtual void OnReceiveOperationMessage(OperationMessage operationMessage)
 {
     NotifyObservers(operationMessage);
 }