Exemple #1
0
 public void RegistNetEventChannel(byte channel, INetEventHandleBase eventHandle)
 {
     if (this.mEventHandles.ContainsKey(channel))
     {
         this.mEventHandles.Remove(channel);
     }
     this.mEventHandles[channel] = eventHandle;
 }
Exemple #2
0
        protected bool ExecResponse(byte channel, OperationResponse operationResponse)
        {
            INetEventHandleBase netEventHandleBase = null;
            bool result;

            if (this.mEventHandles.TryGetValue(channel, out netEventHandleBase))
            {
                netEventHandleBase.OnResponse(operationResponse);
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }