Example #1
0
        private bool ReadBuffer(Buffer buffer)
        {
            return(buffer.ExecuteRead(delegate(MessageType message_type) {
                switch (message_type)
                {
                case MessageType.RequestConstant: constant_manager.ReadRequest(buffer); break;

                case MessageType.UpdateConstant: constant_manager.ReadUpdate(buffer); break;

                case MessageType.FullUpdateConstant: constant_manager.ReadFullUpdate(buffer); break;

                case MessageType.InvokeEntityMethod: entity_manager.ReadMethodInvoke(buffer); break;

                case MessageType.ChangeEntityAuthority: entity_manager.ReadAuthority(buffer); break;

                case MessageType.DestroyEntity: entity_manager.ReadDestroy(buffer); break;

                case MessageType.UpdateEntity: entity_manager.ReadUpdate(buffer); break;

                case MessageType.InvokeSystemMethod: system_manager.ReadMethodInvoke(buffer); break;

                default: throw new UnaccountedBranchException("message_type", message_type);
                }
            }));
        }