コード例 #1
0
 /// <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);
     }
 }