コード例 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (CustomState.Length != 0)
            {
                hash ^= CustomState.GetHashCode();
            }
            if (dataCase_ == DataOneofCase.GenericDialog)
            {
                hash ^= GenericDialog.GetHashCode();
            }
            if (dataCase_ == DataOneofCase.Pause)
            {
                hash ^= Pause.GetHashCode();
            }
            if (dataCase_ == DataOneofCase.AdviceOverlay)
            {
                hash ^= AdviceOverlay.GetHashCode();
            }
            if (dataCase_ == DataOneofCase.AdviceInterjection)
            {
                hash ^= AdviceInterjection.GetHashCode();
            }
            if (dataCase_ == DataOneofCase.ConversationInterjection)
            {
                hash ^= ConversationInterjection.GetHashCode();
            }
            if (CallToActionAsset.Length != 0)
            {
                hash ^= CallToActionAsset.GetHashCode();
            }
            if (CallToActionButtonIdentifier.Length != 0)
            {
                hash ^= CallToActionButtonIdentifier.GetHashCode();
            }
            hash ^= (int)dataCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
        public void MergeFrom(ClientStoryboardStep other)
        {
            if (other == null)
            {
                return;
            }
            if (other.CustomState.Length != 0)
            {
                CustomState = other.CustomState;
            }
            if (other.CallToActionAsset.Length != 0)
            {
                CallToActionAsset = other.CallToActionAsset;
            }
            if (other.CallToActionButtonIdentifier.Length != 0)
            {
                CallToActionButtonIdentifier = other.CallToActionButtonIdentifier;
            }
            switch (other.DataCase)
            {
            case DataOneofCase.GenericDialog:
                if (GenericDialog == null)
                {
                    GenericDialog = new global::WUProtos.Data.Storyboard.StoryboardGenericDialogStep();
                }
                GenericDialog.MergeFrom(other.GenericDialog);
                break;

            case DataOneofCase.Pause:
                if (Pause == null)
                {
                    Pause = new global::WUProtos.Data.Storyboard.StoryboardPauseStep();
                }
                Pause.MergeFrom(other.Pause);
                break;

            case DataOneofCase.AdviceOverlay:
                if (AdviceOverlay == null)
                {
                    AdviceOverlay = new global::WUProtos.Data.Storyboard.StoryboardAdviceOverlayStep();
                }
                AdviceOverlay.MergeFrom(other.AdviceOverlay);
                break;

            case DataOneofCase.AdviceInterjection:
                if (AdviceInterjection == null)
                {
                    AdviceInterjection = new global::WUProtos.Data.Storyboard.StoryboardAdviceInterjectionStep();
                }
                AdviceInterjection.MergeFrom(other.AdviceInterjection);
                break;

            case DataOneofCase.ConversationInterjection:
                if (ConversationInterjection == null)
                {
                    ConversationInterjection = new global::WUProtos.Data.Storyboard.StoryboardConversationInterjectionStep();
                }
                ConversationInterjection.MergeFrom(other.ConversationInterjection);
                break;
            }

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