public override int GetHashCode() { int hash = 1; if (Address1.Length != 0) { hash ^= Address1.GetHashCode(); } if (Address2.Length != 0) { hash ^= Address2.GetHashCode(); } if (City.Length != 0) { hash ^= City.GetHashCode(); } if (State.Length != 0) { hash ^= State.GetHashCode(); } if (ZipCode.Length != 0) { hash ^= ZipCode.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { unchecked { var hashCode = (Address1 != null ? Address1.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (State != null ? State.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Zipcode != null ? Zipcode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Address1?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (Address2?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (City?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ProvinceStateCode?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (CountryCode?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (OtherCountry?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (PostalZipCode?.GetHashCode() ?? 0); return(hashCode); } }
/// <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 (ReferenceNumber != null) { hashCode = hashCode * 59 + ReferenceNumber.GetHashCode(); } if (FirstName != null) { hashCode = hashCode * 59 + FirstName.GetHashCode(); } if (LastName != null) { hashCode = hashCode * 59 + LastName.GetHashCode(); } if (Address1 != null) { hashCode = hashCode * 59 + Address1.GetHashCode(); } if (Address2 != null) { hashCode = hashCode * 59 + Address2.GetHashCode(); } if (City != null) { hashCode = hashCode * 59 + City.GetHashCode(); } if (State != null) { hashCode = hashCode * 59 + State.GetHashCode(); } if (CountryCode != null) { hashCode = hashCode * 59 + CountryCode.GetHashCode(); } if (PostalCode != null) { hashCode = hashCode * 59 + PostalCode.GetHashCode(); } if (PhoneNumber != null) { hashCode = hashCode * 59 + PhoneNumber.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = (Address1 != null ? Address1.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Address2 != null ? Address2.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Company != null ? Company.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Country != null ? Country.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Phone != null ? Phone.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Province != null ? Province.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Zip != null ? Zip.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Address1 != null?Address1.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (Address2 != null ? Address2.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Company != null ? Company.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Country != null ? Country.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Postcode != null ? Postcode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (State != null ? State.GetHashCode() : 0); return(hashCode); } }
#pragma warning disable CS1584 // XML comment has syntactically incorrect cref attribute #pragma warning disable CS1658 // Warning is overriding an error /// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// </returns> /// <seealso cref="https://stackoverflow.com/questions/263400/what-is-the-best-algorithm-for-an-overridden-system-object-gethashcode/263416#263416"/> public override int GetHashCode() { unchecked // Overflow is fine, just wrap. { int hash = 17; hash = hash * 23 + FirstName?.GetHashCode() ?? 0; hash = hash * 23 + LastName?.GetHashCode() ?? 0; hash = hash * 23 + Email?.GetHashCode() ?? 0; hash = hash * 23 + Country?.GetHashCode() ?? 0; hash = hash * 23 + StateProvince?.GetHashCode() ?? 0; hash = hash * 23 + City?.GetHashCode() ?? 0; hash = hash * 23 + Address1?.GetHashCode() ?? 0; hash = hash * 23 + Address2?.GetHashCode() ?? 0; hash = hash * 23 + PostalCode?.GetHashCode() ?? 0; hash = hash * 23 + PhoneNumber?.GetHashCode() ?? 0; return(hash); } }
public override int GetHashCode() { unchecked { var result = NamedTupleCommon.DefaultHashCode; result = (result << 5) + result ^ (Id.GetHashCode()); result = (result << 5) + result ^ (CareOf != null ? CareOf.GetHashCode() : NamedTupleCommon.DefaultHashCode); result = (result << 5) + result ^ (Address1 != null ? Address1.GetHashCode() : NamedTupleCommon.DefaultHashCode); result = (result << 5) + result ^ (Address2 != null ? Address2.GetHashCode() : NamedTupleCommon.DefaultHashCode); result = (result << 5) + result ^ (Address3 != null ? Address3.GetHashCode() : NamedTupleCommon.DefaultHashCode); result = (result << 5) + result ^ (Address4 != null ? Address4.GetHashCode() : NamedTupleCommon.DefaultHashCode); result = (result << 5) + result ^ (City != null ? City.GetHashCode() : NamedTupleCommon.DefaultHashCode); result = (result << 5) + result ^ (Zip != null ? Zip.GetHashCode() : NamedTupleCommon.DefaultHashCode); result = (result << 5) + result ^ (County != null ? County.GetHashCode() : NamedTupleCommon.DefaultHashCode); result = (result << 5) + result ^ (Country != null ? Country.GetHashCode() : NamedTupleCommon.DefaultHashCode); return(result); } }
public override int GetHashCode() { unchecked { var hashCode = Company != null?Company.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (Address1 != null ? Address1.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Address2 != null ? Address2.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Address3 != null ? Address3.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Address4 != null ? Address4.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Address5 != null ? Address5.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Town != null ? Town.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (County != null ? County.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Postcode != null ? Postcode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Country != null ? Country.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = (Address1 != null ? Address1.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Address2 != null ? Address2.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CartNote != null ? CartNote.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Company != null ? Company.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Country != null ? Country.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CreatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ CustomerId.GetHashCode(); hashCode = (hashCode * 397) ^ DiscountId.GetHashCode(); hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Id.GetHashCode(); hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Phone != null ? Phone.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Province != null ? Province.GetHashCode() : 0); hashCode = (hashCode * 397) ^ UpdatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ (Zip != null ? Zip.GetHashCode() : 0); 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 (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() { return(Id.GetHashCode() ^ Address1.GetHashCode()); }
public override int GetHashCode() { return(Address1.GetHashCode() ^ Address2.GetHashCode() ^ City.GetHashCode() ^ PostCode.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 (OwnerCode != null) { hash = hash * 59 + OwnerCode.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 (StatusComment != null) { hash = hash * 59 + StatusComment.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 (GivenName != null) { hash = hash * 59 + GivenName.GetHashCode(); } if (Surname != null) { hash = hash * 59 + Surname.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(); } if (CGLEndDate != null) { hash = hash * 59 + CGLEndDate.GetHashCode(); } if (CglPolicyNumber != null) { hash = hash * 59 + CglPolicyNumber.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() { int hash = 1; if (entityId_ != null) { hash ^= EntityId.GetHashCode(); } if (Description.Length != 0) { hash ^= Description.GetHashCode(); } if (checkinTimeOfDay_ != null) { hash ^= CheckinTimeOfDay.GetHashCode(); } if (checkOutTimeOfDay_ != null) { hash ^= CheckOutTimeOfDay.GetHashCode(); } if (rolloverTimeOfDay_ != null) { hash ^= RolloverTimeOfDay.GetHashCode(); } if (AllowedEarlyCheckinHours != 0) { hash ^= AllowedEarlyCheckinHours.GetHashCode(); } if (IifDocnumPrefix.Length != 0) { hash ^= IifDocnumPrefix.GetHashCode(); } if (IifCustomerName.Length != 0) { hash ^= IifCustomerName.GetHashCode(); } if (checkinDeposit_ != null) { hash ^= CheckinDeposit.GetHashCode(); } if (lastRevenueAccrualStart_ != null) { hash ^= LastRevenueAccrualStart.GetHashCode(); } if (lastDateHkRolloverRan_ != null) { hash ^= LastDateHkRolloverRan.GetHashCode(); } if (Address1.Length != 0) { hash ^= Address1.GetHashCode(); } if (Address2.Length != 0) { hash ^= Address2.GetHashCode(); } if (City.Length != 0) { hash ^= City.GetHashCode(); } if (State.Length != 0) { hash ^= State.GetHashCode(); } if (Zip.Length != 0) { hash ^= Zip.GetHashCode(); } if (PhoneNumber.Length != 0) { hash ^= PhoneNumber.GetHashCode(); } if (cardMerchant_ != null) { hash ^= CardMerchant.GetHashCode(); } if (cancellationPolicy_ != null) { hash ^= CancellationPolicy.GetHashCode(); } if (maximumAuthorizationAmount_ != null) { hash ^= MaximumAuthorizationAmount.GetHashCode(); } if (DefaultStayLength != 0) { hash ^= DefaultStayLength.GetHashCode(); } if (Website.Length != 0) { hash ^= Website.GetHashCode(); } if (ReservationEmail.Length != 0) { hash ^= ReservationEmail.GetHashCode(); } if (FaxNumber.Length != 0) { hash ^= FaxNumber.GetHashCode(); } if (BookingPrefix.Length != 0) { hash ^= BookingPrefix.GetHashCode(); } if (VoidAuthorizationsAfterDays != 0) { hash ^= VoidAuthorizationsAfterDays.GetHashCode(); } if (NoShowDelayHours != 0) { hash ^= NoShowDelayHours.GetHashCode(); } return(hash); }