/// <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)); }
/// <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); } }