コード例 #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: {
                    if (response_ == null)
                    {
                        Response = new global::TournamentAssistantShared.Models.Packets.Response();
                    }
                    input.ReadMessage(Response);
                    break;
                }

                case 18: {
                    global::TournamentAssistantShared.Models.Coordinator subBuilder = new global::TournamentAssistantShared.Models.Coordinator();
                    if (userCase_ == UserOneofCase.Coordinator)
                    {
                        subBuilder.MergeFrom(Coordinator);
                    }
                    input.ReadMessage(subBuilder);
                    Coordinator = subBuilder;
                    break;
                }

                case 26: {
                    global::TournamentAssistantShared.Models.Player subBuilder = new global::TournamentAssistantShared.Models.Player();
                    if (userCase_ == UserOneofCase.Player)
                    {
                        subBuilder.MergeFrom(Player);
                    }
                    input.ReadMessage(subBuilder);
                    Player = subBuilder;
                    break;
                }

                case 34: {
                    if (state_ == null)
                    {
                        State = new global::TournamentAssistantShared.Models.State();
                    }
                    input.ReadMessage(State);
                    break;
                }

                case 40: {
                    ServerVersion = input.ReadInt32();
                    break;
                }
                }
            }
        }
コード例 #2
0
        public void MergeFrom(ConnectResponse other)
        {
            if (other == null)
            {
                return;
            }
            if (other.response_ != null)
            {
                if (response_ == null)
                {
                    Response = new global::TournamentAssistantShared.Models.Packets.Response();
                }
                Response.MergeFrom(other.Response);
            }
            if (other.state_ != null)
            {
                if (state_ == null)
                {
                    State = new global::TournamentAssistantShared.Models.State();
                }
                State.MergeFrom(other.State);
            }
            if (other.ServerVersion != 0)
            {
                ServerVersion = other.ServerVersion;
            }
            switch (other.UserCase)
            {
            case UserOneofCase.Coordinator:
                if (Coordinator == null)
                {
                    Coordinator = new global::TournamentAssistantShared.Models.Coordinator();
                }
                Coordinator.MergeFrom(other.Coordinator);
                break;

            case UserOneofCase.Player:
                if (Player == null)
                {
                    Player = new global::TournamentAssistantShared.Models.Player();
                }
                Player.MergeFrom(other.Player);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
コード例 #3
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: {
                    if (response_ == null)
                    {
                        Response = new global::TournamentAssistantShared.Models.Packets.Response();
                    }
                    input.ReadMessage(Response);
                    break;
                }

                case 18: {
                    global::TournamentAssistantShared.Models.Coordinator subBuilder = new global::TournamentAssistantShared.Models.Coordinator();
                    if (userCase_ == UserOneofCase.Coordinator)
                    {
                        subBuilder.MergeFrom(Coordinator);
                    }
                    input.ReadMessage(subBuilder);
                    Coordinator = subBuilder;
                    break;
                }

                case 26: {
                    global::TournamentAssistantShared.Models.Player subBuilder = new global::TournamentAssistantShared.Models.Player();
                    if (userCase_ == UserOneofCase.Player)
                    {
                        subBuilder.MergeFrom(Player);
                    }
                    input.ReadMessage(subBuilder);
                    Player = subBuilder;
                    break;
                }

                case 34: {
                    if (state_ == null)
                    {
                        State = new global::TournamentAssistantShared.Models.State();
                    }
                    input.ReadMessage(State);
                    break;
                }

                case 40: {
                    ServerVersion = input.ReadInt32();
                    break;
                }
                }
            }
    #endif
        }