public override int GetHashCode() { unchecked { var hashCode = (Service != null ? Service.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Route != null ? Route.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Method != null ? Method.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Payload != null ? Payload.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (RequestUri != null ? RequestUri.GetHashCode() : 0); return(hashCode); } }
public virtual int _GetUniqueIdentifier() { var hashCode = 399326290; hashCode = hashCode * -1521134295 + (RequestPath?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Message?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (RequestId?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (RequestMethod?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (ElapsedMsecs?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (IP?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Service?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Operation?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (StatusCode?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Timestamp?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Username?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (RequestUri?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (ClientId?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (ClientName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (ProductName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (RequestLogKey?.GetHashCode() ?? 0); return(hashCode); }
/// <summary> /// Returns the hashcode of this Object /// </summary> /// <returns>Hash code (int)</returns> public override int GetHashCode() { // Credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks etc, of course :) if (Id != null) { hash = hash * 59 + Id.GetHashCode(); } if (LogMessageTypeId != null) { hash = hash * 59 + LogMessageTypeId.GetHashCode(); } if (ApplicationName != null) { hash = hash * 59 + ApplicationName.GetHashCode(); } if (ApplicationMethod != null) { hash = hash * 59 + ApplicationMethod.GetHashCode(); } if (IpAddress != null) { hash = hash * 59 + IpAddress.GetHashCode(); } if (LoginToken != null) { hash = hash * 59 + LoginToken.GetHashCode(); } if (ShortMessage != null) { hash = hash * 59 + ShortMessage.GetHashCode(); } if (RequestHttpMethod != null) { hash = hash * 59 + RequestHttpMethod.GetHashCode(); } if (RequestUri != null) { hash = hash * 59 + RequestUri.GetHashCode(); } if (RequestParams != null) { hash = hash * 59 + RequestParams.GetHashCode(); } if (RequestBody != null) { hash = hash * 59 + RequestBody.GetHashCode(); } if (StatusCode != null) { hash = hash * 59 + StatusCode.GetHashCode(); } if (ResponseContent != null) { hash = hash * 59 + ResponseContent.GetHashCode(); } if (FullMessage != null) { hash = hash * 59 + FullMessage.GetHashCode(); } if (Exception != null) { hash = hash * 59 + Exception.GetHashCode(); } if (Trace != null) { hash = hash * 59 + Trace.GetHashCode(); } if (Logged != null) { hash = hash * 59 + Logged.GetHashCode(); } return(hash); } }