示例#1
0
        public bool Equals(PropertyChain other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (_chain.Length != other._chain.Length)
            {
                return(false);
            }

            for (int i = 0; i < _chain.Length; i++)
            {
                IValueGetter info      = _chain[i];
                IValueGetter otherInfo = other._chain[i];

                if (!info.Equals(otherInfo))
                {
                    return(false);
                }
            }

            return(_innerProperty.Equals(other._innerProperty));
        }