/// <summary>
        /// Indicates whether this operation affects the same dirtiable objects that the given operation.
        /// </summary>
        /// <param name="otherOperation">The operation for which to compare dirtiables.</param>
        /// <returns><c>True</c> if this operation affects the same dirtiable objects that the given operation, <c>False</c> otherwise.</returns>
        public bool HasSameDirtiables(DirtyingOperation otherOperation)
        {
            if (otherOperation.Dirtiables.Count != Dirtiables.Count)
                return false;

            foreach (var dirtiable in Dirtiables)
            {
                if (!otherOperation.Dirtiables.Contains(dirtiable))
                    return false;
            }
            return true;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Indicates whether this operation affects the same dirtiable objects that the given operation.
        /// </summary>
        /// <param name="otherOperation">The operation for which to compare dirtiables.</param>
        /// <returns><c>True</c> if this operation affects the same dirtiable objects that the given operation, <c>False</c> otherwise.</returns>
        public bool HasSameDirtiables(DirtyingOperation otherOperation)
        {
            if (otherOperation.Dirtiables.Count != Dirtiables.Count)
            {
                return(false);
            }

            foreach (var dirtiable in Dirtiables)
            {
                if (!otherOperation.Dirtiables.Contains(dirtiable))
                {
                    return(false);
                }
            }
            return(true);
        }