/// <summary>Serves as a hash function for a particular type. </summary> /// <returns>A hash code for the current <see cref="T:System.Object" />.</returns> public override int GetHashCode() { int result = 31; result = 17 * result + IsError.GetHashCode(); result = 17 * result + Instruction.GetHashCode(); result = 17 * result + TranslationInstruction.GetHashCode(); result = 17 * result + Message.GetHashCode(); return(result); }
public override int GetHashCode() { unchecked { var hashCode = (FileName != null ? FileName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ LineNumber; hashCode = (hashCode * 397) ^ ColumnNumber; hashCode = (hashCode * 397) ^ IsError.GetHashCode(); hashCode = (hashCode * 397) ^ (ErrorCode != null ? ErrorCode.GetHashCode() : 0); return(hashCode); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; // Suitable nullity checks etc, of course :) if (IsCanceled != null) { hashCode = hashCode * 59 + IsCanceled.GetHashCode(); } if (IsError != null) { hashCode = hashCode * 59 + IsError.GetHashCode(); } if (ErrorCode != null) { hashCode = hashCode * 59 + ErrorCode.GetHashCode(); } if (AccessToken != null) { hashCode = hashCode * 59 + AccessToken.GetHashCode(); } if (IdToken != null) { hashCode = hashCode * 59 + IdToken.GetHashCode(); } if (Scopes != null) { hashCode = hashCode * 59 + Scopes.GetHashCode(); } if (ExpiresOn != null) { hashCode = hashCode * 59 + ExpiresOn.GetHashCode(); } return(hashCode); } }