/// <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 (HandlerName != null)
         {
             hashCode = hashCode * 59 + HandlerName.GetHashCode();
         }
         if (UserExpirationTime != null)
         {
             hashCode = hashCode * 59 + UserExpirationTime.GetHashCode();
         }
         if (UserAutoMembership != null)
         {
             hashCode = hashCode * 59 + UserAutoMembership.GetHashCode();
         }
         if (UserPropertyMapping != null)
         {
             hashCode = hashCode * 59 + UserPropertyMapping.GetHashCode();
         }
         if (UserPathPrefix != null)
         {
             hashCode = hashCode * 59 + UserPathPrefix.GetHashCode();
         }
         if (UserMembershipExpTime != null)
         {
             hashCode = hashCode * 59 + UserMembershipExpTime.GetHashCode();
         }
         if (UserMembershipNestingDepth != null)
         {
             hashCode = hashCode * 59 + UserMembershipNestingDepth.GetHashCode();
         }
         if (UserDynamicMembership != null)
         {
             hashCode = hashCode * 59 + UserDynamicMembership.GetHashCode();
         }
         if (UserDisableMissing != null)
         {
             hashCode = hashCode * 59 + UserDisableMissing.GetHashCode();
         }
         if (GroupExpirationTime != null)
         {
             hashCode = hashCode * 59 + GroupExpirationTime.GetHashCode();
         }
         if (GroupAutoMembership != null)
         {
             hashCode = hashCode * 59 + GroupAutoMembership.GetHashCode();
         }
         if (GroupPropertyMapping != null)
         {
             hashCode = hashCode * 59 + GroupPropertyMapping.GetHashCode();
         }
         if (GroupPathPrefix != null)
         {
             hashCode = hashCode * 59 + GroupPathPrefix.GetHashCode();
         }
         if (EnableRFC7613UsercaseMappedProfile != null)
         {
             hashCode = hashCode * 59 + EnableRFC7613UsercaseMappedProfile.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#2
0
 public override int GetHashCode()
 {
     return(Number.GetHashCode() ^ HandlerName.GetHashCode() ^ DogName.GetHashCode() ^ (CountryCode ?? string.Empty).GetHashCode());
 }