/// <summary> /// Provides a hash function for the type. /// </summary> public override int GetHashCode() { int callbackHashCode = (DetermineLocalityCallback != null) ? DetermineLocalityCallback.GetHashCode() : 0; int predicateHashCode = (ContinueProcessingPredicate != null)? ContinueProcessingPredicate.GetHashCode() : 0; return(DifferenceType.GetHashCode() ^ Locality.GetHashCode() ^ IgnoreTrimWhiteSpace.GetHashCode() ^ WordSplitBehavior.GetHashCode() ^ callbackHashCode ^ predicateHashCode); }
public override int GetHashCode() { int hash = 1; if (locality_ != null) { hash ^= Locality.GetHashCode(); } hash ^= lbEndpoints_.GetHashCode(); if (loadBalancingWeight_ != null) { hash ^= LoadBalancingWeight.GetHashCode(); } if (Priority != 0) { hash ^= Priority.GetHashCode(); } if (proximity_ != null) { hash ^= Proximity.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (DeviceType.Length != 0) { hash ^= DeviceType.GetHashCode(); } if (MemoryLimit != 0L) { hash ^= MemoryLimit.GetHashCode(); } if (locality_ != null) { hash ^= Locality.GetHashCode(); } if (Incarnation != 0UL) { hash ^= Incarnation.GetHashCode(); } if (PhysicalDeviceDesc.Length != 0) { hash ^= PhysicalDeviceDesc.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (locality_ != null) { hash ^= Locality.GetHashCode(); } if (TotalSuccessfulRequests != 0UL) { hash ^= TotalSuccessfulRequests.GetHashCode(); } if (TotalRequestsInProgress != 0UL) { hash ^= TotalRequestsInProgress.GetHashCode(); } if (TotalErrorRequests != 0UL) { hash ^= TotalErrorRequests.GetHashCode(); } hash ^= loadMetricStats_.GetHashCode(); if (Priority != 0) { hash ^= Priority.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <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 (Number != null) { hashCode = hashCode * 59 + Number.GetHashCode(); } if (Street != null) { hashCode = hashCode * 59 + Street.GetHashCode(); } if (City != null) { hashCode = hashCode * 59 + City.GetHashCode(); } if (Locality != null) { hashCode = hashCode * 59 + Locality.GetHashCode(); } if (Zip != null) { hashCode = hashCode * 59 + Zip.GetHashCode(); } if (Country != null) { hashCode = hashCode * 59 + Country.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hash = 0; if (!string.IsNullOrWhiteSpace(AddressLine)) { hash ^= AddressLine.GetHashCode(); } if (!string.IsNullOrWhiteSpace(AdminDistrict)) { hash ^= AdminDistrict.GetHashCode(); } if (!string.IsNullOrWhiteSpace(AdminDistrict2)) { hash ^= AdminDistrict2.GetHashCode(); } if (!string.IsNullOrWhiteSpace(CountryRegion)) { hash ^= CountryRegion.GetHashCode(); } if (!string.IsNullOrWhiteSpace(FormattedAddress)) { hash ^= FormattedAddress.GetHashCode(); } if (!string.IsNullOrWhiteSpace(Locality)) { hash ^= Locality.GetHashCode(); } if (!string.IsNullOrWhiteSpace(PostalCode)) { hash ^= PostalCode.GetHashCode(); } if (!string.IsNullOrWhiteSpace(PostalTown)) { hash ^= PostalTown.GetHashCode(); } if (!string.IsNullOrWhiteSpace(Landmark)) { hash ^= Landmark.GetHashCode(); } if (!string.IsNullOrWhiteSpace(Neighborhood)) { hash ^= Neighborhood.GetHashCode(); } return(hash); }
public override int GetHashCode() { unchecked { var hashCode = (StreetAddress != null ? StreetAddress.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Locality != null ? Locality.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Region != null ? Region.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PostalCode != null ? PostalCode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CountryName != null ? CountryName.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (Revision != 0) { hash ^= Revision.GetHashCode(); } if (RegionCode.Length != 0) { hash ^= RegionCode.GetHashCode(); } if (LanguageCode.Length != 0) { hash ^= LanguageCode.GetHashCode(); } if (PostalCode.Length != 0) { hash ^= PostalCode.GetHashCode(); } if (SortingCode.Length != 0) { hash ^= SortingCode.GetHashCode(); } if (AdministrativeArea.Length != 0) { hash ^= AdministrativeArea.GetHashCode(); } if (Locality.Length != 0) { hash ^= Locality.GetHashCode(); } if (Sublocality.Length != 0) { hash ^= Sublocality.GetHashCode(); } hash ^= addressLines_.GetHashCode(); hash ^= recipients_.GetHashCode(); if (Organization.Length != 0) { hash ^= Organization.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hashCode = -1623438759; if (AddressLine1 != null) { hashCode += AddressLine1.GetHashCode(); } if (AddressLine2 != null) { hashCode += AddressLine2.GetHashCode(); } if (AddressLine3 != null) { hashCode += AddressLine3.GetHashCode(); } if (Locality != null) { hashCode += Locality.GetHashCode(); } if (Sublocality != null) { hashCode += Sublocality.GetHashCode(); } if (Sublocality2 != null) { hashCode += Sublocality2.GetHashCode(); } if (Sublocality3 != null) { hashCode += Sublocality3.GetHashCode(); } if (AdministrativeDistrictLevel1 != null) { hashCode += AdministrativeDistrictLevel1.GetHashCode(); } if (AdministrativeDistrictLevel2 != null) { hashCode += AdministrativeDistrictLevel2.GetHashCode(); } if (AdministrativeDistrictLevel3 != null) { hashCode += AdministrativeDistrictLevel3.GetHashCode(); } if (PostalCode != null) { hashCode += PostalCode.GetHashCode(); } if (Country != null) { hashCode += Country.GetHashCode(); } if (FirstName != null) { hashCode += FirstName.GetHashCode(); } if (LastName != null) { hashCode += LastName.GetHashCode(); } if (Organization != null) { hashCode += Organization.GetHashCode(); } return(hashCode); }