コード例 #1
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 10: {
                    global::OpenVASP.ProtocolMessages.Messages.ProtoSessionRequestMessage subBuilder = new global::OpenVASP.ProtocolMessages.Messages.ProtoSessionRequestMessage();
                    if (msgCase_ == MsgOneofCase.SessionRequestMessage)
                    {
                        subBuilder.MergeFrom(SessionRequestMessage);
                    }
                    input.ReadMessage(subBuilder);
                    SessionRequestMessage = subBuilder;
                    break;
                }

                case 18: {
                    global::OpenVASP.ProtocolMessages.Messages.ProtoSessionReplyMessage subBuilder = new global::OpenVASP.ProtocolMessages.Messages.ProtoSessionReplyMessage();
                    if (msgCase_ == MsgOneofCase.SessionReplyMessage)
                    {
                        subBuilder.MergeFrom(SessionReplyMessage);
                    }
                    input.ReadMessage(subBuilder);
                    SessionReplyMessage = subBuilder;
                    break;
                }

                case 26: {
                    global::OpenVASP.ProtocolMessages.Messages.ProtoTransferRequestMessage subBuilder = new global::OpenVASP.ProtocolMessages.Messages.ProtoTransferRequestMessage();
                    if (msgCase_ == MsgOneofCase.TransferRequestMessage)
                    {
                        subBuilder.MergeFrom(TransferRequestMessage);
                    }
                    input.ReadMessage(subBuilder);
                    TransferRequestMessage = subBuilder;
                    break;
                }

                case 34: {
                    global::OpenVASP.ProtocolMessages.Messages.ProtoTransferReplyMessage subBuilder = new global::OpenVASP.ProtocolMessages.Messages.ProtoTransferReplyMessage();
                    if (msgCase_ == MsgOneofCase.TransferReplyMessage)
                    {
                        subBuilder.MergeFrom(TransferReplyMessage);
                    }
                    input.ReadMessage(subBuilder);
                    TransferReplyMessage = subBuilder;
                    break;
                }

                case 42: {
                    global::OpenVASP.ProtocolMessages.Messages.ProtoTransferDispatchMessage subBuilder = new global::OpenVASP.ProtocolMessages.Messages.ProtoTransferDispatchMessage();
                    if (msgCase_ == MsgOneofCase.TransferDispatchMessage)
                    {
                        subBuilder.MergeFrom(TransferDispatchMessage);
                    }
                    input.ReadMessage(subBuilder);
                    TransferDispatchMessage = subBuilder;
                    break;
                }

                case 50: {
                    global::OpenVASP.ProtocolMessages.Messages.ProtoTransferConfirmationMessage subBuilder = new global::OpenVASP.ProtocolMessages.Messages.ProtoTransferConfirmationMessage();
                    if (msgCase_ == MsgOneofCase.TransaferConfirmationMessage)
                    {
                        subBuilder.MergeFrom(TransaferConfirmationMessage);
                    }
                    input.ReadMessage(subBuilder);
                    TransaferConfirmationMessage = subBuilder;
                    break;
                }

                case 58: {
                    global::OpenVASP.ProtocolMessages.Messages.ProtoTerminationMessage subBuilder = new global::OpenVASP.ProtocolMessages.Messages.ProtoTerminationMessage();
                    if (msgCase_ == MsgOneofCase.TerminationMessage)
                    {
                        subBuilder.MergeFrom(TerminationMessage);
                    }
                    input.ReadMessage(subBuilder);
                    TerminationMessage = subBuilder;
                    break;
                }

                case 7992: {
                    ReservedField = input.ReadInt32();
                    break;
                }

                case 8002: {
                    Signature = input.ReadString();
                    break;
                }
                }
            }
        }
コード例 #2
0
        public void MergeFrom(ProtoMessageWrapper other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Signature.Length != 0)
            {
                Signature = other.Signature;
            }
            switch (other.MsgCase)
            {
            case MsgOneofCase.SessionRequestMessage:
                if (SessionRequestMessage == null)
                {
                    SessionRequestMessage = new global::OpenVASP.ProtocolMessages.Messages.ProtoSessionRequestMessage();
                }
                SessionRequestMessage.MergeFrom(other.SessionRequestMessage);
                break;

            case MsgOneofCase.SessionReplyMessage:
                if (SessionReplyMessage == null)
                {
                    SessionReplyMessage = new global::OpenVASP.ProtocolMessages.Messages.ProtoSessionReplyMessage();
                }
                SessionReplyMessage.MergeFrom(other.SessionReplyMessage);
                break;

            case MsgOneofCase.TransferRequestMessage:
                if (TransferRequestMessage == null)
                {
                    TransferRequestMessage = new global::OpenVASP.ProtocolMessages.Messages.ProtoTransferRequestMessage();
                }
                TransferRequestMessage.MergeFrom(other.TransferRequestMessage);
                break;

            case MsgOneofCase.TransferReplyMessage:
                if (TransferReplyMessage == null)
                {
                    TransferReplyMessage = new global::OpenVASP.ProtocolMessages.Messages.ProtoTransferReplyMessage();
                }
                TransferReplyMessage.MergeFrom(other.TransferReplyMessage);
                break;

            case MsgOneofCase.TransferDispatchMessage:
                if (TransferDispatchMessage == null)
                {
                    TransferDispatchMessage = new global::OpenVASP.ProtocolMessages.Messages.ProtoTransferDispatchMessage();
                }
                TransferDispatchMessage.MergeFrom(other.TransferDispatchMessage);
                break;

            case MsgOneofCase.TransaferConfirmationMessage:
                if (TransaferConfirmationMessage == null)
                {
                    TransaferConfirmationMessage = new global::OpenVASP.ProtocolMessages.Messages.ProtoTransferConfirmationMessage();
                }
                TransaferConfirmationMessage.MergeFrom(other.TransaferConfirmationMessage);
                break;

            case MsgOneofCase.TerminationMessage:
                if (TerminationMessage == null)
                {
                    TerminationMessage = new global::OpenVASP.ProtocolMessages.Messages.ProtoTerminationMessage();
                }
                TerminationMessage.MergeFrom(other.TerminationMessage);
                break;

            case MsgOneofCase.ReservedField:
                ReservedField = other.ReservedField;
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }