예제 #1
0
        /// <summary>
        ///     Determines if this instance is value-type equal with another instance.
        /// </summary>
        /// <param name="other">The other instance.</param>
        /// <returns><c>true</c> if this instance is value-type equal with the other instance, <c>false</c> otherwise.</returns>
        /// <inheritdoc />
        /// <remarks>Typically this is a field by field equality operation, but does NOT consider the ID</remarks>
        public override bool ValueEquals(Frame other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
            var positionEqual = Position.Equals(other.Position);

            if (!positionEqual)
            {
                return(false);
            }
            var registerEqual = RegisterSet.Equals(other.RegisterSet);

            if (!registerEqual)
            {
                return(false);
            }
            var stackFramesEqual = StackTrace.Equals(other.StackTrace);

            if (!stackFramesEqual)
            {
                return(false);
            }
            var threadEqual = ThreadId.Equals(other.ThreadId);

            if (!threadEqual)
            {
                return(false);
            }
            var disassemblyLineEqual = DisassemblyLine.Equals(other.DisassemblyLine);

            if (!disassemblyLineEqual)
            {
                return(false);
            }
            return(true);
        }