Beispiel #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);
        }
Beispiel #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (MessageType != 0)
            {
                hash ^= MessageType.GetHashCode();
            }
            if (dataBodyCase_ == DataBodyOneofCase.HeartbeatRequest)
            {
                hash ^= HeartbeatRequest.GetHashCode();
            }
            if (dataBodyCase_ == DataBodyOneofCase.HeartbeatResponse)
            {
                hash ^= HeartbeatResponse.GetHashCode();
            }
            hash ^= (int)dataBodyCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }