Esempio n. 1
0
        /// <summary>
        /// <see cref="System.IEquatable{T}.Equals(T)"/>
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public bool Equals(ItemCount <T> other)
        {
            if (_value != null)
            {
                return(this._value.Equals(other._value) && this._count == other._count);
            }

            return(other._value == null && this._count == other._count);
        }
Esempio n. 2
0
        /// <summary>
        /// <see cref="System.IEquatable{T}.Equals(T)"/>
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public bool Equals(ItemCount <T> other)
        {
            if (other == null)
            {
                return(false);
            }

            if (RepresentativeValue != null)
            {
                return(this.RepresentativeValue.Equals(other.RepresentativeValue) && this.Count == other.Count);
            }

            return(other.RepresentativeValue == null && this.Count == other.Count);
        }