/// <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 (HistoryText != null) { hash = hash * 59 + HistoryText.GetHashCode(); } if (LastUpdateUserid != null) { hash = hash * 59 + LastUpdateUserid.GetHashCode(); } if (LastUpdateTimestamp != null) { hash = hash * 59 + LastUpdateTimestamp.GetHashCode(); } if (AffectedEntityId != null) { hash = hash * 59 + AffectedEntityId.GetHashCode(); } return(hash); } }
/// <summary> /// Returns true if AttachmentViewModel instances are equal /// </summary> /// <param name="other">Instance of AttachmentViewModel to be compared</param> /// <returns>Boolean</returns> public bool Equals(AttachmentViewModel other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id.Equals(other.Id) ) && ( FileName == other.FileName || FileName != null && FileName.Equals(other.FileName) ) && ( FileSize == other.FileSize || FileSize != null && FileSize.Equals(other.FileSize) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( LastUpdateUserid == other.LastUpdateUserid || LastUpdateUserid != null && LastUpdateUserid.Equals(other.LastUpdateUserid) ) && ( LastUpdateTimestamp == other.LastUpdateTimestamp || LastUpdateTimestamp != null && LastUpdateTimestamp.Equals(other.LastUpdateTimestamp) )); }
/// <summary> /// Returns true if HistoryViewModel instances are equal /// </summary> /// <param name="other">Instance of HistoryViewModel to be compared</param> /// <returns>Boolean</returns> public bool Equals(HistoryViewModel other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id.Equals(other.Id) ) && ( HistoryText == other.HistoryText || HistoryText != null && HistoryText.Equals(other.HistoryText) ) && ( LastUpdateUserid == other.LastUpdateUserid || LastUpdateUserid != null && LastUpdateUserid.Equals(other.LastUpdateUserid) ) && ( LastUpdateTimestamp == other.LastUpdateTimestamp || LastUpdateTimestamp != null && LastUpdateTimestamp.Equals(other.LastUpdateTimestamp) ) && ( AffectedEntityId == other.AffectedEntityId || AffectedEntityId != null && AffectedEntityId.Equals(other.AffectedEntityId) )); }
/// <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 (FileName != null) { hash = hash * 59 + FileName.GetHashCode(); } if (FileSize != null) { hash = hash * 59 + FileSize.GetHashCode(); } if (Description != null) { hash = hash * 59 + Description.GetHashCode(); } if (Type != null) { hash = hash * 59 + Type.GetHashCode(); } if (LastUpdateUserid != null) { hash = hash * 59 + LastUpdateUserid.GetHashCode(); } if (LastUpdateTimestamp != null) { hash = hash * 59 + LastUpdateTimestamp.GetHashCode(); } return(hash); } }