Beispiel #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Path != null)
         {
             hashCode = hashCode * 59 + Path.GetHashCode();
         }
         if (ServiceRanking != null)
         {
             hashCode = hashCode * 59 + ServiceRanking.GetHashCode();
         }
         if (JaasControlFlag != null)
         {
             hashCode = hashCode * 59 + JaasControlFlag.GetHashCode();
         }
         if (JaasRealmName != null)
         {
             hashCode = hashCode * 59 + JaasRealmName.GetHashCode();
         }
         if (JaasRanking != null)
         {
             hashCode = hashCode * 59 + JaasRanking.GetHashCode();
         }
         if (Headers != null)
         {
             hashCode = hashCode * 59 + Headers.GetHashCode();
         }
         if (Cookies != null)
         {
             hashCode = hashCode * 59 + Cookies.GetHashCode();
         }
         if (Parameters != null)
         {
             hashCode = hashCode * 59 + Parameters.GetHashCode();
         }
         if (Usermap != null)
         {
             hashCode = hashCode * 59 + Usermap.GetHashCode();
         }
         if (Format != null)
         {
             hashCode = hashCode * 59 + Format.GetHashCode();
         }
         if (TrustedCredentialsAttribute != null)
         {
             hashCode = hashCode * 59 + TrustedCredentialsAttribute.GetHashCode();
         }
         return(hashCode);
     }
 }
Beispiel #2
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Method != null ? Method.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Headers != null ? Headers.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Cookies != null ? Cookies.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Body != null ? Body.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Path != null ? Path.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Secure.GetHashCode();
         hashCode = (hashCode * 397) ^ KeepAlive.GetHashCode();
         return(hashCode);
     }
 }