Exemplo n.º 1
0
        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
                    break;

                case 10: {
                    global::ChatServer.Transmissions.ServerJoinRequest subBuilder = new global::ChatServer.Transmissions.ServerJoinRequest();
                    if (requestCase_ == RequestOneofCase.ServerJoinRequest)
                    {
                        subBuilder.MergeFrom(ServerJoinRequest);
                    }
                    input.ReadMessage(subBuilder);
                    ServerJoinRequest = subBuilder;
                    break;
                }

                case 18: {
                    global::ChatServer.Transmissions.ChatJoinRequest subBuilder = new global::ChatServer.Transmissions.ChatJoinRequest();
                    if (requestCase_ == RequestOneofCase.ChatJoinRequest)
                    {
                        subBuilder.MergeFrom(ChatJoinRequest);
                    }
                    input.ReadMessage(subBuilder);
                    ChatJoinRequest = subBuilder;
                    break;
                }

                case 26: {
                    global::ChatServer.Transmissions.ChatLeaveRequest subBuilder = new global::ChatServer.Transmissions.ChatLeaveRequest();
                    if (requestCase_ == RequestOneofCase.ChatLeaveRequest)
                    {
                        subBuilder.MergeFrom(ChatLeaveRequest);
                    }
                    input.ReadMessage(subBuilder);
                    ChatLeaveRequest = subBuilder;
                    break;
                }

                case 34: {
                    global::ChatServer.Transmissions.NameChangeRequest subBuilder = new global::ChatServer.Transmissions.NameChangeRequest();
                    if (requestCase_ == RequestOneofCase.NameChangeRequest)
                    {
                        subBuilder.MergeFrom(NameChangeRequest);
                    }
                    input.ReadMessage(subBuilder);
                    NameChangeRequest = subBuilder;
                    break;
                }
                }
            }
        }
Exemplo n.º 2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
            input.ReadRawMessage(this);
    #else
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    global::ChatServer.Transmissions.ServerJoinRequest subBuilder = new global::ChatServer.Transmissions.ServerJoinRequest();
                    if (requestCase_ == RequestOneofCase.ServerJoinRequest)
                    {
                        subBuilder.MergeFrom(ServerJoinRequest);
                    }
                    input.ReadMessage(subBuilder);
                    ServerJoinRequest = subBuilder;
                    break;
                }

                case 18: {
                    global::ChatServer.Transmissions.ChatJoinRequest subBuilder = new global::ChatServer.Transmissions.ChatJoinRequest();
                    if (requestCase_ == RequestOneofCase.ChatJoinRequest)
                    {
                        subBuilder.MergeFrom(ChatJoinRequest);
                    }
                    input.ReadMessage(subBuilder);
                    ChatJoinRequest = subBuilder;
                    break;
                }

                case 26: {
                    global::ChatServer.Transmissions.ChatLeaveRequest subBuilder = new global::ChatServer.Transmissions.ChatLeaveRequest();
                    if (requestCase_ == RequestOneofCase.ChatLeaveRequest)
                    {
                        subBuilder.MergeFrom(ChatLeaveRequest);
                    }
                    input.ReadMessage(subBuilder);
                    ChatLeaveRequest = subBuilder;
                    break;
                }

                case 34: {
                    global::ChatServer.Transmissions.NameChangeRequest subBuilder = new global::ChatServer.Transmissions.NameChangeRequest();
                    if (requestCase_ == RequestOneofCase.NameChangeRequest)
                    {
                        subBuilder.MergeFrom(NameChangeRequest);
                    }
                    input.ReadMessage(subBuilder);
                    NameChangeRequest = subBuilder;
                    break;
                }
                }
            }
    #endif
        }