/// <summary> /// Returns true if ComparisionResultEnvironment instances are equal /// </summary> /// <param name="other">Instance of ComparisionResultEnvironment to be compared</param> /// <returns>Boolean</returns> public bool Equals(ComparisionResultEnvironment other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( FromVersion == other.FromVersion || FromVersion != null && FromVersion.Equals(other.FromVersion) ) && ( ToVersion == other.ToVersion || ToVersion != null && ToVersion.Equals(other.ToVersion) )); }
public override void ToStream(Stream output) { output.Write(TLUtils.SignatureToBytes(Signature)); LangCode.ToStream(output); FromVersion.ToStream(output); Version.ToStream(output); Strings.ToStream(output); }
public override int GetHashCode() { unchecked { int hashCode = (ChangeDetails != null ? ChangeDetails.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (IssueDetails != null ? IssueDetails.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Generated.GetHashCode(); hashCode = (hashCode * 397) ^ (FromVersion != null ? FromVersion.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ToVersion != null ? ToVersion.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ReferenceBuildConfiguration != null ? ReferenceBuildConfiguration.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BuildConfiguration != null ? BuildConfiguration.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 (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (FromVersion != null) { hashCode = hashCode * 59 + FromVersion.GetHashCode(); } if (ToVersion != null) { hashCode = hashCode * 59 + ToVersion.GetHashCode(); } return(hashCode); } }