示例#1
0
        /// <summary>
        /// Determines whether the specified <see cref="System.Object" /> is equal to this instance.
        /// </summary>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            Token tOther = (Token)obj;

            return(SourceNode.Equals(tOther.SourceNode) && IsClose.Equals(tOther.IsClose));
        }
示例#2
0
        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        public override int GetHashCode()
        {
            unchecked
            {
                int hash = 17;

                if (SourceNode != null)
                {
                    hash = hash * 92821 + SourceNode.GetHashCode( );
                }

                hash = hash * 92821 + IsClose.GetHashCode( );

                return(hash);
            }
        }