Beispiel #1
0
        /// <inheritdoc/>
        public virtual bool CanMerge(IMergeableOperation otherOperation)
        {
            var operation = otherOperation as ContentValueChangeOperation;

            if (operation == null)
            {
                return(false);
            }

            if (ChangeType != ContentChangeType.ValueChange && ChangeType != ContentChangeType.CollectionUpdate)
            {
                return(false);
            }

            if (Node != operation.Node)
            {
                return(false);
            }

            if (!Equals(Index, operation.Index))
            {
                return(false);
            }

            if (ChangeType != operation.ChangeType)
            {
                return(false);
            }

            return(true);
        }
        /// <inheritdoc/>
        public virtual bool CanMerge(IMergeableOperation otherOperation)
        {
            var operation = otherOperation as PropertyChangeOperation;
            if (operation == null)
                return false;

            if (container != operation.container)
                return false;

            if (!HasSameDirtiables(operation))
                return false;

            return true;
        }
Beispiel #3
0
        /// <inheritdoc/>
        public virtual bool CanMerge(IMergeableOperation otherOperation)
        {
            var operation = otherOperation as PropertyChangeOperation;

            if (operation == null)
            {
                return(false);
            }

            if (container != operation.container)
            {
                return(false);
            }

            if (!HasSameDirtiables(operation))
            {
                return(false);
            }

            return(true);
        }
        /// <inheritdoc/>
        public override bool CanMerge(IMergeableOperation otherOperation)
        {
            var operation = otherOperation as AssetContentValueChangeOperation;

            return(newOverride == operation?.previousOverride && base.CanMerge(otherOperation));
        }