コード例 #1
0
 protected bool Equals(EvAdsUserProfile other)
 {
     return(string.Equals(_userId, other._userId) &&
            string.Equals(EmailAddress, other.EmailAddress) &&
            string.Equals(Description, other.Description) &&
            string.Equals(DisplayName, other.DisplayName) &&
            Enabled.Equals(other.Enabled) &&
            string.Equals(GivenName, other.GivenName) &&
            string.Equals(SamAccountName, other.SamAccountName) &&
            string.Equals(Surname, other.Surname) &&
            UserCannotChangePassword.Equals(other.UserCannotChangePassword) &&
            string.Equals(UserPrincipalName, other.UserPrincipalName) &&
            string.Equals(VoiceTelephoneNumber, other.VoiceTelephoneNumber));
 }
コード例 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (_userId != null ? _userId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (EmailAddress != null ? EmailAddress.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DisplayName != null ? DisplayName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Enabled.GetHashCode();
         hashCode = (hashCode * 397) ^ (GivenName != null ? GivenName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Surname != null ? Surname.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ UserCannotChangePassword.GetHashCode();
         hashCode = (hashCode * 397) ^ (UserPrincipalName != null ? UserPrincipalName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (VoiceTelephoneNumber != null ? VoiceTelephoneNumber.GetHashCode() : 0);
         return(hashCode);
     }
 }