Exemple #1
0
        /// <summary>
        ///     Determines whether the specified <see cref="DisassemblyLine" /> is equal to this instance.
        /// </summary>
        /// <param name="other">The other.</param>
        /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
        protected bool Equals(DisassemblyLine other)
        {
            var inst = InstructionAddress == other.InstructionAddress;
            var seq  = OpCode.SequenceEqual(other.OpCode);
            var mnem = OpCodeMnemonic == other.OpCodeMnemonic;
            var note = DisassemblyNote == other.DisassemblyNote;

            return(inst && seq && mnem && note);
        }
Exemple #2
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);
        }