/// <summary>
        /// Determines whether the specified Object is equal to the current Object.
        /// The objects are equal if every entry in KvpList match.
        /// </summary>
        /// <param name="other">The specified MassShiftResult object.</param>
        /// <returns>true if the objects are equal, false otherwise</returns>
        public bool Equals(MassShiftResult other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;

            foreach (var keyValuePair in KvpList)
            {
                bool otherValue = other.KvpList.Where(x => x.Key == keyValuePair.Key).First().Value;
                if(otherValue != keyValuePair.Value)
                {
                    return false;
                }
            }

            return true;
        }
Esempio n. 2
0
        /// <summary>
        /// Determines whether the specified Object is equal to the current Object.
        /// The objects are equal if every entry in KvpList match.
        /// </summary>
        /// <param name="other">The specified MassShiftResult object.</param>
        /// <returns>true if the objects are equal, false otherwise</returns>
        public bool Equals(MassShiftResult other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            foreach (var keyValuePair in KvpList)
            {
                bool otherValue = other.KvpList.Where(x => x.Key == keyValuePair.Key).First().Value;
                if (otherValue != keyValuePair.Value)
                {
                    return(false);
                }
            }

            return(true);
        }