示例#1
0
        public override void HandleMessage(ClientStructure client, IMessageData messageData)
        {
            var data = (AdminBaseMsgData)messageData;

            switch (data.AdminMessageType)
            {
            case AdminMessageType.ListRequest:
                AdminSystemSender.SendAdminList(client);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
        public override void HandleMessage(ClientStructure client, IClientMessageBase message)
        {
            var data = (AdminBaseMsgData)message.Data;

            switch (data.AdminMessageType)
            {
            case AdminMessageType.ListRequest:
                AdminSystemSender.SendAdminList(client);

                //We don't use this message anymore so we can recycle it
                message.Recycle();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }