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;
                }
                }
            }
        }
Example #2
0
        public void MergeFrom(Match other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Guid.Length != 0)
            {
                Guid = other.Guid;
            }
            players_.Add(other.players_);
            if (other.selectedLevel_ != null)
            {
                if (selectedLevel_ == null)
                {
                    SelectedLevel = new global::TournamentAssistantShared.Models.PreviewBeatmapLevel();
                }
                SelectedLevel.MergeFrom(other.SelectedLevel);
            }
            if (other.selectedCharacteristic_ != null)
            {
                if (selectedCharacteristic_ == null)
                {
                    SelectedCharacteristic = new global::TournamentAssistantShared.Models.Characteristic();
                }
                SelectedCharacteristic.MergeFrom(other.SelectedCharacteristic);
            }
            if (other.SelectedDifficulty != global::TournamentAssistantShared.Models.BeatmapDifficulty.Easy)
            {
                SelectedDifficulty = other.SelectedDifficulty;
            }
            switch (other.LeaderCase)
            {
            case LeaderOneofCase.Coordinator:
                if (Coordinator == null)
                {
                    Coordinator = new global::TournamentAssistantShared.Models.Coordinator();
                }
                Coordinator.MergeFrom(other.Coordinator);
                break;

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

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
        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);
        }
        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
        }
Example #5
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: {
                    Guid = input.ReadString();
                    break;
                }

                case 18: {
                    players_.AddEntriesFrom(ref input, _repeated_players_codec);
                    break;
                }

                case 26: {
                    global::TournamentAssistantShared.Models.Coordinator subBuilder = new global::TournamentAssistantShared.Models.Coordinator();
                    if (leaderCase_ == LeaderOneofCase.Coordinator)
                    {
                        subBuilder.MergeFrom(Coordinator);
                    }
                    input.ReadMessage(subBuilder);
                    Coordinator = subBuilder;
                    break;
                }

                case 34: {
                    global::TournamentAssistantShared.Models.Player subBuilder = new global::TournamentAssistantShared.Models.Player();
                    if (leaderCase_ == LeaderOneofCase.Player)
                    {
                        subBuilder.MergeFrom(Player);
                    }
                    input.ReadMessage(subBuilder);
                    Player = subBuilder;
                    break;
                }

                case 42: {
                    if (selectedLevel_ == null)
                    {
                        SelectedLevel = new global::TournamentAssistantShared.Models.PreviewBeatmapLevel();
                    }
                    input.ReadMessage(SelectedLevel);
                    break;
                }

                case 50: {
                    if (selectedCharacteristic_ == null)
                    {
                        SelectedCharacteristic = new global::TournamentAssistantShared.Models.Characteristic();
                    }
                    input.ReadMessage(SelectedCharacteristic);
                    break;
                }

                case 56: {
                    SelectedDifficulty = (global::TournamentAssistantShared.Models.BeatmapDifficulty)input.ReadEnum();
                    break;
                }
                }
            }
        }
Example #6
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: {
                    Guid = input.ReadString();
                    break;
                }

                case 18: {
                    players_.AddEntriesFrom(input, _repeated_players_codec);
                    break;
                }

                case 26: {
                    global::TournamentAssistantShared.Models.Coordinator subBuilder = new global::TournamentAssistantShared.Models.Coordinator();
                    if (leaderCase_ == LeaderOneofCase.Coordinator)
                    {
                        subBuilder.MergeFrom(Coordinator);
                    }
                    input.ReadMessage(subBuilder);
                    Coordinator = subBuilder;
                    break;
                }

                case 34: {
                    global::TournamentAssistantShared.Models.Player subBuilder = new global::TournamentAssistantShared.Models.Player();
                    if (leaderCase_ == LeaderOneofCase.Player)
                    {
                        subBuilder.MergeFrom(Player);
                    }
                    input.ReadMessage(subBuilder);
                    Player = subBuilder;
                    break;
                }

                case 42: {
                    if (selectedLevel_ == null)
                    {
                        SelectedLevel = new global::TournamentAssistantShared.Models.PreviewBeatmapLevel();
                    }
                    input.ReadMessage(SelectedLevel);
                    break;
                }

                case 50: {
                    if (selectedCharacteristic_ == null)
                    {
                        SelectedCharacteristic = new global::TournamentAssistantShared.Models.Characteristic();
                    }
                    input.ReadMessage(SelectedCharacteristic);
                    break;
                }

                case 56: {
                    SelectedDifficulty = (global::TournamentAssistantShared.Models.BeatmapDifficulty)input.ReadEnum();
                    break;
                }
                }
            }
    #endif
        }