예제 #1
0
        public void MergeFrom(IOMapping other)
        {
            if (other == null)
            {
                return;
            }
            if (other.InteractionId.Length != 0)
            {
                InteractionId = other.InteractionId;
            }
            if (other.Topic.Length != 0)
            {
                Topic = other.Topic;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.InteractionInput:
                if (InteractionInput == null)
                {
                    InteractionInput = new global::Ubii.Interactions.IOFormat();
                }
                InteractionInput.MergeFrom(other.InteractionInput);
                break;

            case TypeOneofCase.InteractionOutput:
                if (InteractionOutput == null)
                {
                    InteractionOutput = new global::Ubii.Interactions.IOFormat();
                }
                InteractionOutput.MergeFrom(other.InteractionOutput);
                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 10: {
                    InteractionId = input.ReadString();
                    break;
                }

                case 18: {
                    global::Ubii.Interactions.IOFormat subBuilder = new global::Ubii.Interactions.IOFormat();
                    if (typeCase_ == TypeOneofCase.InteractionInput)
                    {
                        subBuilder.MergeFrom(InteractionInput);
                    }
                    input.ReadMessage(subBuilder);
                    InteractionInput = subBuilder;
                    break;
                }

                case 26: {
                    global::Ubii.Interactions.IOFormat subBuilder = new global::Ubii.Interactions.IOFormat();
                    if (typeCase_ == TypeOneofCase.InteractionOutput)
                    {
                        subBuilder.MergeFrom(InteractionOutput);
                    }
                    input.ReadMessage(subBuilder);
                    InteractionOutput = subBuilder;
                    break;
                }

                case 34: {
                    Topic = input.ReadString();
                    break;
                }
                }
            }
        }