Пример #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 override int GetHashCode()
        {
            int hash = 1;

            if (InteractionId.Length != 0)
            {
                hash ^= InteractionId.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.InteractionInput)
            {
                hash ^= InteractionInput.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.InteractionOutput)
            {
                hash ^= InteractionOutput.GetHashCode();
            }
            if (Topic.Length != 0)
            {
                hash ^= Topic.GetHashCode();
            }
            hash ^= (int)typeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }