public override int GetHashCode() { unchecked { var hashCode = (ProductVersion != null ? ProductVersion.GetHashCode() : 0); hashCode = (hashCode * 397) ^ BuildVersion; hashCode = (hashCode * 397) ^ (CommitHash != null ? CommitHash.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FullVersion != null ? FullVersion.GetHashCode() : 0); return(hashCode); } }
/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns>A hash code for the current <see cref="T:System.Object" />.</returns> public override int GetHashCode() { return(Architecture.GetHashCode() ^ Bootable.GetHashCode() ^ CustomizedInfo.GetHashCode() ^ DefaultLanguageIndex ^ (string.IsNullOrWhiteSpace(EditionId) ? 0 : EditionId.GetHashCode()) ^ (string.IsNullOrWhiteSpace(Hal) ? 0 : Hal.GetHashCode()) ^ (string.IsNullOrWhiteSpace(ImageDescription) ? 0 : ImageDescription.GetHashCode()) ^ ImageIndex.GetHashCode() ^ ImageType.GetHashCode() ^ (string.IsNullOrWhiteSpace(InstallationType) ? 0 : InstallationType.GetHashCode()) ^ Languages.GetHashCode() ^ (string.IsNullOrWhiteSpace(ProductName) ? 0 : ProductName.GetHashCode()) ^ (string.IsNullOrWhiteSpace(ProductSuite) ? 0 : ProductSuite.GetHashCode()) ^ (string.IsNullOrWhiteSpace(ProductType) ? 0 : ProductType.GetHashCode()) ^ ProductVersion.GetHashCode() ^ SpLevel.GetHashCode() ^ (string.IsNullOrWhiteSpace(SystemRoot) ? 0 : SystemRoot.GetHashCode())); }