Ejemplo 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::Prisel.Protobuf.ChatPayload subBuilder = new global::Prisel.Protobuf.ChatPayload();
                    if (payloadCase_ == PayloadOneofCase.ChatPayload)
                    {
                        subBuilder.MergeFrom(ChatPayload);
                    }
                    input.ReadMessage(subBuilder);
                    ChatPayload = subBuilder;
                    break;
                }

                case 18: {
                    global::Prisel.Protobuf.BroadcastPayload subBuilder = new global::Prisel.Protobuf.BroadcastPayload();
                    if (payloadCase_ == PayloadOneofCase.BroadcastPayload)
                    {
                        subBuilder.MergeFrom(BroadcastPayload);
                    }
                    input.ReadMessage(subBuilder);
                    BroadcastPayload = subBuilder;
                    break;
                }

                case 26: {
                    global::Prisel.Protobuf.CreateRoomRequest subBuilder = new global::Prisel.Protobuf.CreateRoomRequest();
                    if (payloadCase_ == PayloadOneofCase.CreateRoomRequest)
                    {
                        subBuilder.MergeFrom(CreateRoomRequest);
                    }
                    input.ReadMessage(subBuilder);
                    CreateRoomRequest = subBuilder;
                    break;
                }

                case 34: {
                    global::Prisel.Protobuf.CreateRoomResponse subBuilder = new global::Prisel.Protobuf.CreateRoomResponse();
                    if (payloadCase_ == PayloadOneofCase.CreateRoomResponse)
                    {
                        subBuilder.MergeFrom(CreateRoomResponse);
                    }
                    input.ReadMessage(subBuilder);
                    CreateRoomResponse = subBuilder;
                    break;
                }

                case 42: {
                    global::Prisel.Protobuf.ErrorPayload subBuilder = new global::Prisel.Protobuf.ErrorPayload();
                    if (payloadCase_ == PayloadOneofCase.ErrorPayload)
                    {
                        subBuilder.MergeFrom(ErrorPayload);
                    }
                    input.ReadMessage(subBuilder);
                    ErrorPayload = subBuilder;
                    break;
                }

                case 50: {
                    global::Prisel.Protobuf.GetLobbyStateResponse subBuilder = new global::Prisel.Protobuf.GetLobbyStateResponse();
                    if (payloadCase_ == PayloadOneofCase.GetLobbyStateResponse)
                    {
                        subBuilder.MergeFrom(GetLobbyStateResponse);
                    }
                    input.ReadMessage(subBuilder);
                    GetLobbyStateResponse = subBuilder;
                    break;
                }

                case 58: {
                    global::Prisel.Protobuf.GetRoomStateResponse subBuilder = new global::Prisel.Protobuf.GetRoomStateResponse();
                    if (payloadCase_ == PayloadOneofCase.GetRoomStateResponse)
                    {
                        subBuilder.MergeFrom(GetRoomStateResponse);
                    }
                    input.ReadMessage(subBuilder);
                    GetRoomStateResponse = subBuilder;
                    break;
                }

                case 66: {
                    global::Prisel.Protobuf.JoinRequest subBuilder = new global::Prisel.Protobuf.JoinRequest();
                    if (payloadCase_ == PayloadOneofCase.JoinRequest)
                    {
                        subBuilder.MergeFrom(JoinRequest);
                    }
                    input.ReadMessage(subBuilder);
                    JoinRequest = subBuilder;
                    break;
                }

                case 74: {
                    global::Prisel.Protobuf.JoinResponse subBuilder = new global::Prisel.Protobuf.JoinResponse();
                    if (payloadCase_ == PayloadOneofCase.JoinResponse)
                    {
                        subBuilder.MergeFrom(JoinResponse);
                    }
                    input.ReadMessage(subBuilder);
                    JoinResponse = subBuilder;
                    break;
                }

                case 82: {
                    global::Prisel.Protobuf.LoginRequest subBuilder = new global::Prisel.Protobuf.LoginRequest();
                    if (payloadCase_ == PayloadOneofCase.LoginRequest)
                    {
                        subBuilder.MergeFrom(LoginRequest);
                    }
                    input.ReadMessage(subBuilder);
                    LoginRequest = subBuilder;
                    break;
                }

                case 90: {
                    global::Prisel.Protobuf.LoginResponse subBuilder = new global::Prisel.Protobuf.LoginResponse();
                    if (payloadCase_ == PayloadOneofCase.LoginResponse)
                    {
                        subBuilder.MergeFrom(LoginResponse);
                    }
                    input.ReadMessage(subBuilder);
                    LoginResponse = subBuilder;
                    break;
                }

                case 98: {
                    global::Prisel.Protobuf.RoomStateChangePayload subBuilder = new global::Prisel.Protobuf.RoomStateChangePayload();
                    if (payloadCase_ == PayloadOneofCase.RoomStateChangePayload)
                    {
                        subBuilder.MergeFrom(RoomStateChangePayload);
                    }
                    input.ReadMessage(subBuilder);
                    RoomStateChangePayload = subBuilder;
                    break;
                }

                case 122: {
                    global::Google.Protobuf.WellKnownTypes.Any subBuilder = new global::Google.Protobuf.WellKnownTypes.Any();
                    if (payloadCase_ == PayloadOneofCase.ActionPayload)
                    {
                        subBuilder.MergeFrom(ActionPayload);
                    }
                    input.ReadMessage(subBuilder);
                    ActionPayload = subBuilder;
                    break;
                }
                }
            }
        }
Ejemplo 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::Prisel.Protobuf.ChatPayload subBuilder = new global::Prisel.Protobuf.ChatPayload();
                    if (payloadCase_ == PayloadOneofCase.ChatPayload)
                    {
                        subBuilder.MergeFrom(ChatPayload);
                    }
                    input.ReadMessage(subBuilder);
                    ChatPayload = subBuilder;
                    break;
                }

                case 18: {
                    global::Prisel.Protobuf.BroadcastPayload subBuilder = new global::Prisel.Protobuf.BroadcastPayload();
                    if (payloadCase_ == PayloadOneofCase.BroadcastPayload)
                    {
                        subBuilder.MergeFrom(BroadcastPayload);
                    }
                    input.ReadMessage(subBuilder);
                    BroadcastPayload = subBuilder;
                    break;
                }

                case 26: {
                    global::Prisel.Protobuf.CreateRoomRequest subBuilder = new global::Prisel.Protobuf.CreateRoomRequest();
                    if (payloadCase_ == PayloadOneofCase.CreateRoomRequest)
                    {
                        subBuilder.MergeFrom(CreateRoomRequest);
                    }
                    input.ReadMessage(subBuilder);
                    CreateRoomRequest = subBuilder;
                    break;
                }

                case 34: {
                    global::Prisel.Protobuf.CreateRoomResponse subBuilder = new global::Prisel.Protobuf.CreateRoomResponse();
                    if (payloadCase_ == PayloadOneofCase.CreateRoomResponse)
                    {
                        subBuilder.MergeFrom(CreateRoomResponse);
                    }
                    input.ReadMessage(subBuilder);
                    CreateRoomResponse = subBuilder;
                    break;
                }

                case 42: {
                    global::Prisel.Protobuf.ErrorPayload subBuilder = new global::Prisel.Protobuf.ErrorPayload();
                    if (payloadCase_ == PayloadOneofCase.ErrorPayload)
                    {
                        subBuilder.MergeFrom(ErrorPayload);
                    }
                    input.ReadMessage(subBuilder);
                    ErrorPayload = subBuilder;
                    break;
                }

                case 50: {
                    global::Prisel.Protobuf.GetLobbyStateResponse subBuilder = new global::Prisel.Protobuf.GetLobbyStateResponse();
                    if (payloadCase_ == PayloadOneofCase.GetLobbyStateResponse)
                    {
                        subBuilder.MergeFrom(GetLobbyStateResponse);
                    }
                    input.ReadMessage(subBuilder);
                    GetLobbyStateResponse = subBuilder;
                    break;
                }

                case 58: {
                    global::Prisel.Protobuf.GetRoomStateResponse subBuilder = new global::Prisel.Protobuf.GetRoomStateResponse();
                    if (payloadCase_ == PayloadOneofCase.GetRoomStateResponse)
                    {
                        subBuilder.MergeFrom(GetRoomStateResponse);
                    }
                    input.ReadMessage(subBuilder);
                    GetRoomStateResponse = subBuilder;
                    break;
                }

                case 66: {
                    global::Prisel.Protobuf.JoinRequest subBuilder = new global::Prisel.Protobuf.JoinRequest();
                    if (payloadCase_ == PayloadOneofCase.JoinRequest)
                    {
                        subBuilder.MergeFrom(JoinRequest);
                    }
                    input.ReadMessage(subBuilder);
                    JoinRequest = subBuilder;
                    break;
                }

                case 74: {
                    global::Prisel.Protobuf.JoinResponse subBuilder = new global::Prisel.Protobuf.JoinResponse();
                    if (payloadCase_ == PayloadOneofCase.JoinResponse)
                    {
                        subBuilder.MergeFrom(JoinResponse);
                    }
                    input.ReadMessage(subBuilder);
                    JoinResponse = subBuilder;
                    break;
                }

                case 82: {
                    global::Prisel.Protobuf.LoginRequest subBuilder = new global::Prisel.Protobuf.LoginRequest();
                    if (payloadCase_ == PayloadOneofCase.LoginRequest)
                    {
                        subBuilder.MergeFrom(LoginRequest);
                    }
                    input.ReadMessage(subBuilder);
                    LoginRequest = subBuilder;
                    break;
                }

                case 90: {
                    global::Prisel.Protobuf.LoginResponse subBuilder = new global::Prisel.Protobuf.LoginResponse();
                    if (payloadCase_ == PayloadOneofCase.LoginResponse)
                    {
                        subBuilder.MergeFrom(LoginResponse);
                    }
                    input.ReadMessage(subBuilder);
                    LoginResponse = subBuilder;
                    break;
                }

                case 98: {
                    global::Prisel.Protobuf.RoomStateChangePayload subBuilder = new global::Prisel.Protobuf.RoomStateChangePayload();
                    if (payloadCase_ == PayloadOneofCase.RoomStateChangePayload)
                    {
                        subBuilder.MergeFrom(RoomStateChangePayload);
                    }
                    input.ReadMessage(subBuilder);
                    RoomStateChangePayload = subBuilder;
                    break;
                }

                case 122: {
                    global::Google.Protobuf.WellKnownTypes.Any subBuilder = new global::Google.Protobuf.WellKnownTypes.Any();
                    if (payloadCase_ == PayloadOneofCase.ActionPayload)
                    {
                        subBuilder.MergeFrom(ActionPayload);
                    }
                    input.ReadMessage(subBuilder);
                    ActionPayload = subBuilder;
                    break;
                }
                }
            }
    #endif
        }