public override int GetHashCode() { var hashCode = ServerAddress.GetHashCode() ^ OrganizationName.GetHashCode() ^ EndpointType.GetHashCode(); // ReSharper disable once NonReadonlyMemberInGetHashCode if (Credentials != null) { if (EndpointType == AuthenticationProviderType.ActiveDirectory) { return(hashCode ^ Credentials.Windows.ClientCredential.UserName.GetHashCode() ^ Credentials.Windows.ClientCredential.Domain.GetHashCode()); } if (EndpointType == AuthenticationProviderType.LiveId) { return(hashCode ^ Credentials.UserName.UserName.GetHashCode() ^ DeviceCredentials.UserName.UserName.GetHashCode() ^ DeviceCredentials.UserName.Password.GetHashCode()); } return(hashCode ^ Credentials.UserName.UserName.GetHashCode()); } return(hashCode); }
/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns> /// A hash code for the current <see cref="T:System.Object"/>. /// </returns> /// <filterpriority>2</filterpriority> public override int GetHashCode() { unchecked { int result = (Phone != null ? Phone.GetHashCode() : 0); result = (result * 397) ^ (OrganizationName != null ? OrganizationName.GetHashCode() : 0); result = (result * 397) ^ (OrganizationTaggedDataElement != null ? OrganizationTaggedDataElement.GetHashCode() : 0); return(result); } }
public override int GetHashCode() { unchecked { var hashCode = (ProjectName != null ? ProjectName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OrganizationName != null ? OrganizationName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ LinesOfCode; hashCode = (hashCode * 397) ^ OpenIssueCount; return(hashCode); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + Id.GetHashCode(); if (OwnerCode != null) { hash = hash * 59 + OwnerCode.GetHashCode(); } if (OrganizationName != null) { hash = hash * 59 + OrganizationName.GetHashCode(); } if (LocalAreaName != null) { hash = hash * 59 + LocalAreaName.GetHashCode(); } if (PrimaryContactName != null) { hash = hash * 59 + PrimaryContactName.GetHashCode(); } hash = hash * 59 + EquipmentCount.GetHashCode(); if (Status != null) { hash = hash * 59 + Status.GetHashCode(); } return(hash); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + Id.GetHashCode(); if (OwnerEquipmentCodePrefix != null) { hash = hash * 59 + OwnerEquipmentCodePrefix.GetHashCode(); } if (OrganizationName != null) { hash = hash * 59 + OrganizationName.GetHashCode(); } hash = hash * 59 + MeetsResidency.GetHashCode(); if (LocalArea != null) { hash = hash * 59 + LocalArea.GetHashCode(); } if (Status != null) { hash = hash * 59 + Status.GetHashCode(); } if (DoingBusinessAs != null) { hash = hash * 59 + DoingBusinessAs.GetHashCode(); } if (RegisteredCompanyNumber != null) { hash = hash * 59 + RegisteredCompanyNumber.GetHashCode(); } if (PrimaryContact != null) { hash = hash * 59 + PrimaryContact.GetHashCode(); } if (IsMaintenanceContractor != null) { hash = hash * 59 + IsMaintenanceContractor.GetHashCode(); } if (WorkSafeBCPolicyNumber != null) { hash = hash * 59 + WorkSafeBCPolicyNumber.GetHashCode(); } if (WorkSafeBCExpiryDate != null) { hash = hash * 59 + WorkSafeBCExpiryDate.GetHashCode(); } if (CGLEndDate != null) { hash = hash * 59 + CGLEndDate.GetHashCode(); } if (ArchiveCode != null) { hash = hash * 59 + ArchiveCode.GetHashCode(); } if (ArchiveReason != null) { hash = hash * 59 + ArchiveReason.GetHashCode(); } if (ArchiveDate != null) { hash = hash * 59 + ArchiveDate.GetHashCode(); } if (Contacts != null) { hash = hash * 59 + Contacts.GetHashCode(); } if (Notes != null) { hash = hash * 59 + Notes.GetHashCode(); } if (Attachments != null) { hash = hash * 59 + Attachments.GetHashCode(); } if (History != null) { hash = hash * 59 + History.GetHashCode(); } if (EquipmentList != null) { hash = hash * 59 + EquipmentList.GetHashCode(); } return(hash); } }
public override int GetHashCode() { return(Title.GetHashCode() ^ OrganizationName.GetHashCode() ^ Url.GetHashCode() ^ TimePublished.GetHashCode()); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + Id.GetHashCode(); if (GivenName != null) { hash = hash * 59 + GivenName.GetHashCode(); } if (Surname != null) { hash = hash * 59 + Surname.GetHashCode(); } if (OrganizationName != null) { hash = hash * 59 + OrganizationName.GetHashCode(); } if (Role != null) { hash = hash * 59 + Role.GetHashCode(); } if (Notes != null) { hash = hash * 59 + Notes.GetHashCode(); } if (EmailAddress != null) { hash = hash * 59 + EmailAddress.GetHashCode(); } if (WorkPhoneNumber != null) { hash = hash * 59 + WorkPhoneNumber.GetHashCode(); } if (MobilePhoneNumber != null) { hash = hash * 59 + MobilePhoneNumber.GetHashCode(); } if (FaxPhoneNumber != null) { hash = hash * 59 + FaxPhoneNumber.GetHashCode(); } if (Address1 != null) { hash = hash * 59 + Address1.GetHashCode(); } if (Address2 != null) { hash = hash * 59 + Address2.GetHashCode(); } if (City != null) { hash = hash * 59 + City.GetHashCode(); } if (Province != null) { hash = hash * 59 + Province.GetHashCode(); } if (PostalCode != null) { hash = hash * 59 + PostalCode.GetHashCode(); } return(hash); } }
public override int GetHashCode() { unchecked { return(((PersonName != null ? PersonName.GetHashCode() : 0) * 397) ^ (OrganizationName != null ? OrganizationName.GetHashCode() : 0)); } }