public override int GetHashCode() { int hash = 1; if (Make.Length != 0) { hash ^= Make.GetHashCode(); } if (Model.Length != 0) { hash ^= Model.GetHashCode(); } if (RegistrationYear != 0) { hash ^= RegistrationYear.GetHashCode(); } if (Price != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Price); } if (OwnerEmail.Length != 0) { hash ^= OwnerEmail.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 13; hash = (hash * 7) + Year.GetHashCode(); hash = (hash * 7) + Make.GetHashCode(); hash = (hash * 7) + Model.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 (EquipmentType != null) { hash = hash * 59 + EquipmentType.GetHashCode(); } if (OwnerName != null) { hash = hash * 59 + OwnerName.GetHashCode(); } if (OwnerId != null) { hash = hash * 59 + OwnerId.GetHashCode(); } hash = hash * 59 + IsHired.GetHashCode(); if (Make != null) { hash = hash * 59 + Make.GetHashCode(); } if (Model != null) { hash = hash * 59 + Model.GetHashCode(); } if (Size != null) { hash = hash * 59 + Size.GetHashCode(); } hash = hash * 59 + AttachmentCount.GetHashCode(); if (LastVerifiedDate != null) { hash = hash * 59 + LastVerifiedDate.GetHashCode(); } hash = hash * 59 + SenioritySortOrder.GetHashCode(); return(hash); } }
//Generate a unique id for this object instance. public override int GetHashCode() { return(Make.GetHashCode() + Model.GetHashCode() + Year.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 (EquipmentType != null) { hash = hash * 59 + EquipmentType.GetHashCode(); } if (OwnerName != null) { hash = hash * 59 + OwnerName.GetHashCode(); } if (OwnerId != null) { hash = hash * 59 + OwnerId.GetHashCode(); } if (SeniorityString != null) { hash = hash * 59 + SeniorityString.GetHashCode(); } if (Seniority != null) { hash = hash * 59 + Seniority.GetHashCode(); } if (Make != null) { hash = hash * 59 + Make.GetHashCode(); } if (Model != null) { hash = hash * 59 + Model.GetHashCode(); } if (Size != null) { hash = hash * 59 + Size.GetHashCode(); } if (LastCalled != null) { hash = hash * 59 + LastCalled.GetHashCode(); } if (YearsRegistered != null) { hash = hash * 59 + YearsRegistered.GetHashCode(); } if (YtdHours != null) { hash = hash * 59 + YtdHours.GetHashCode(); } if (HoursYearMinus1 != null) { hash = hash * 59 + HoursYearMinus1.GetHashCode(); } if (HoursYearMinus2 != null) { hash = hash * 59 + HoursYearMinus2.GetHashCode(); } if (HoursYearMinus3 != null) { hash = hash * 59 + HoursYearMinus3.GetHashCode(); } hash = hash * 59 + SenioritySortOrder.GetHashCode(); return(hash); } }