public override int GetHashCode() { int hash = 1; if (FileNameHash != 0) { hash ^= FileNameHash.GetHashCode(); } if (PaddedFileSize != 0) { hash ^= PaddedFileSize.GetHashCode(); } if (UnpaddedFileSize != 0L) { hash ^= UnpaddedFileSize.GetHashCode(); } if (FileOffset != 0L) { hash ^= FileOffset.GetHashCode(); } if (sHAHash_ != null) { hash ^= SHAHash.GetHashCode(); } if (aESKey_ != null) { hash ^= AESKey.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { var hash = 13; hash = (hash * 7) + FileOffset.GetHashCode(); hash = (hash * 7) + FileSize.GetHashCode(); hash = (hash * 7) + RelativeVirtualAddress.GetHashCode(); hash = (hash * 7) + VirtualAddress.GetHashCode(); hash = (hash * 7) + VirtualSize.GetHashCode(); return(hash); }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hash = 17; // Suitable nullity checks etc, of course :) hash = hash * 23 + Width.GetHashCode(); hash = hash * 23 + Height.GetHashCode(); hash = hash * 23 + ColorCount.GetHashCode(); hash = hash * 23 + ReservedByte.GetHashCode(); hash = hash * 23 + Planes.GetHashCode(); hash = hash * 23 + BitCount.GetHashCode(); hash = hash * 23 + SizeInBytes.GetHashCode(); hash = hash * 23 + FileOffset.GetHashCode(); hash = hash * 23 + (SourceFileName == null ? 1 : SourceFileName.GetHashCode()); hash = hash * 23 + SourceIndex.GetHashCode(); return(hash); } }