示例#1
0
        /// <summary>
        /// Determines whether the specified <see cref="System.Object" />, is equal to this instance.
        /// </summary>
        /// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param>
        /// <returns>
        ///   <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.
        /// </returns>
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(obj, null))
            {
                return(false);
            }

            var target = default(ISitemapPage);

            if (obj.GetType().Implements <ISitemapPage>())
            {
                target = (ISitemapPage)obj;
            }

            var isEqual = AreaName.IsEqualTo(target.AreaName) &&
                          PageName.IsEqualTo(target.PageName);

            return(isEqual);
        }