示例#1
0
        public void MergeFrom(BodyStrongMessage other)
        {
            if (other == null)
            {
                return;
            }
            if (other.MessageType != 0)
            {
                MessageType = other.MessageType;
            }
            switch (other.DataBodyCase)
            {
            case DataBodyOneofCase.HeartbeatRequest:
                if (HeartbeatRequest == null)
                {
                    HeartbeatRequest = new global::Com.Bdl.Proto.HeartbeatRequest();
                }
                HeartbeatRequest.MergeFrom(other.HeartbeatRequest);
                break;

            case DataBodyOneofCase.HeartbeatResponse:
                if (HeartbeatResponse == null)
                {
                    HeartbeatResponse = new global::Com.Bdl.Proto.HeartbeatResponse();
                }
                HeartbeatResponse.MergeFrom(other.HeartbeatResponse);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
示例#2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    MessageType = (global::Com.Bdl.Proto.BodyStrongMessage.Types.MessageType)input.ReadEnum();
                    break;
                }

                case 18: {
                    global::Com.Bdl.Proto.HeartbeatRequest subBuilder = new global::Com.Bdl.Proto.HeartbeatRequest();
                    if (dataBodyCase_ == DataBodyOneofCase.HeartbeatRequest)
                    {
                        subBuilder.MergeFrom(HeartbeatRequest);
                    }
                    input.ReadMessage(subBuilder);
                    HeartbeatRequest = subBuilder;
                    break;
                }

                case 26: {
                    global::Com.Bdl.Proto.HeartbeatResponse subBuilder = new global::Com.Bdl.Proto.HeartbeatResponse();
                    if (dataBodyCase_ == DataBodyOneofCase.HeartbeatResponse)
                    {
                        subBuilder.MergeFrom(HeartbeatResponse);
                    }
                    input.ReadMessage(subBuilder);
                    HeartbeatResponse = subBuilder;
                    break;
                }
                }
            }
        }