Esempio n. 1
0
        /// <summary>
        /// Compares for reference AND value equality.
        /// </summary>
        /// <param name="obj">The object to compare with this instance.</param>
        /// <returns>
        ///     <c>true</c> if both operands are equal; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(PduHeader obj)
        {
            bool ivarsEqual = true;

            if (obj.GetType() != this.GetType())
            {
                return(false);
            }

            if (this._protocolVersion != obj._protocolVersion)
            {
                ivarsEqual = false;
            }

            if (this._exerciseID != obj._exerciseID)
            {
                ivarsEqual = false;
            }

            if (this._pduType != obj._pduType)
            {
                ivarsEqual = false;
            }

            if (this._protocolFamily != obj._protocolFamily)
            {
                ivarsEqual = false;
            }

            if (this._timestamp != obj._timestamp)
            {
                ivarsEqual = false;
            }

            if (this._pduLength != obj._pduLength)
            {
                ivarsEqual = false;
            }

            if (this._pduStatus != obj._pduStatus)
            {
                ivarsEqual = false;
            }

            if (this._padding != obj._padding)
            {
                ivarsEqual = false;
            }

            return(ivarsEqual);
        }
Esempio n. 2
0
        /// <summary>
        /// Compares for reference AND value equality.
        /// </summary>
        /// <param name="obj">The object to compare with this instance.</param>
        /// <returns>
        /// 	<c>true</c> if both operands are equal; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(PduHeader obj)
        {
            bool ivarsEqual = true;

            if (obj.GetType() != this.GetType())
            {
                return false;
            }

            if (this._protocolVersion != obj._protocolVersion)
            {
                ivarsEqual = false;
            }

            if (this._exerciseID != obj._exerciseID)
            {
                ivarsEqual = false;
            }

            if (this._pduType != obj._pduType)
            {
                ivarsEqual = false;
            }

            if (this._protocolFamily != obj._protocolFamily)
            {
                ivarsEqual = false;
            }

            if (this._timestamp != obj._timestamp)
            {
                ivarsEqual = false;
            }

            if (this._pduLength != obj._pduLength)
            {
                ivarsEqual = false;
            }

            if (this._pduStatus != obj._pduStatus)
            {
                ivarsEqual = false;
            }

            if (this._padding != obj._padding)
            {
                ivarsEqual = false;
            }

            return ivarsEqual;
        }