public override int GetHashCode() { int hash = 1; if (UserID.Length != 0) { hash ^= UserID.GetHashCode(); } if (FileSize != 0L) { hash ^= FileSize.GetHashCode(); } if (FileName.Length != 0) { hash ^= FileName.GetHashCode(); } if (DownUrl.Length != 0) { hash ^= DownUrl.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (data_ != null) { hash ^= Data.GetHashCode(); } if (fileSize_ != null) { hash ^= FileSize.GetHashCode(); } if (MimeType != 0) { hash ^= MimeType.GetHashCode(); } if (fullSize_ != null) { hash ^= FullSize.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (FileSize != 0L) { hash ^= FileSize.GetHashCode(); } if (Buffer.Length != 0) { hash ^= Buffer.GetHashCode(); } if (ReadedByte != 0) { hash ^= ReadedByte.GetHashCode(); } if (info_ != null) { hash ^= Info.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (data_ != null) { hash ^= Data.GetHashCode(); } if (fileSize_ != null) { hash ^= FileSize.GetHashCode(); } if (MimeType != global::Google.Ads.GoogleAds.V4.Enums.MimeTypeEnum.Types.MimeType.Unspecified) { hash ^= MimeType.GetHashCode(); } if (fullSize_ != null) { hash ^= FullSize.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (FileName.Length != 0) { hash ^= FileName.GetHashCode(); } if (FullPath.Length != 0) { hash ^= FullPath.GetHashCode(); } if (FileSize != 0L) { hash ^= FileSize.GetHashCode(); } if (FileType != 0) { hash ^= FileType.GetHashCode(); } if (SplitterSize != 0) { hash ^= SplitterSize.GetHashCode(); } if (FileData.Length != 0) { hash ^= FileData.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { return(FilePath.GetHashCode() ^ FileSize.GetHashCode() ^ FileSample.Aggregate(0, (acc, e) => acc ^ e.GetHashCode()) ^ SHA2512Hash.Aggregate(0, (acc, e) => acc ^ e.GetHashCode())); }
public override int GetHashCode() { var hashCode = -1706955063; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FilePath); hashCode = hashCode * -1521134295 + FileSize.GetHashCode(); //hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(ModifiedTime.ToString()); // don't count date in the hashcode, because i have to test with imprecision return(hashCode); }
public override int GetHashCode() { int hashCode = -1433868396; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FileId); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FileUniqueId); hashCode = hashCode * -1521134295 + FileSize.GetHashCode(); hashCode = hashCode * -1521134295 + FileDate.GetHashCode(); return(hashCode); }
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() { int hashCode = -1737632191; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FileId); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FileUniqueId); hashCode = hashCode * -1521134295 + FileSize.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FilePath); return(hashCode); }
public override int GetHashCode() { var hashCode = -1754082123; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FileName); hashCode = hashCode * -1521134295 + FileSize.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FileExtension); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FilePath); return(hashCode); }
public override int GetHashCode() { unchecked { int hash = 17; if (Id != null) { hash = hash * 486187739 + Id.GetHashCode(); } if (FileGuid != null) { hash = hash * 486187739 + FileGuid.GetHashCode(); } if (FileName != null) { hash = hash * 486187739 + FileName.GetHashCode(); } if (FileUrn != null) { hash = hash * 486187739 + FileUrn.GetHashCode(); } if (FilePath != null) { hash = hash * 486187739 + FilePath.GetHashCode(); } if (FileType != null) { hash = hash * 486187739 + FileType.GetHashCode(); } if (FileVersion != null) { hash = hash * 486187739 + FileVersion.GetHashCode(); } hash = hash * 486187739 + PublishedViewsCount.GetHashCode(); hash = hash * 486187739 + PublishedSheetsCount.GetHashCode(); hash = hash * 486187739 + FileSize.GetHashCode(); if (FileModifiedDate != null) { hash = hash * 486187739 + FileModifiedDate.GetHashCode(); } if (UserCreate != null) { hash = hash * 486187739 + UserCreate.GetHashCode(); } if (UserLastModified != null) { hash = hash * 486187739 + UserLastModified.GetHashCode(); } return(hash); } }
public override int GetHashCode() { int hash = 17; hash = hash * 23 + Version.GetHashCode(); hash = hash * 23 + ImageBase.GetHashCode(); hash = hash * 23 + FilePath.GetHashCode(); hash = hash * 23 + FileName.GetHashCode(); hash = hash * 23 + FileSize.GetHashCode(); hash = hash * 23 + IsManaged.GetHashCode(); hash = hash * 23 + TimeStamp.GetHashCode(); hash = hash * 23 + PdbInfo.GetHashCode(); hash = hash * 23 + Tags.GetHashCode(); return(hash); }
public override int GetHashCode() { unchecked { var hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (string.IsNullOrEmpty(FileName) ? 0 : FileName.GetHashCode()); hashCode = (hashCode * 397) ^ FileSize.GetHashCode(); hashCode = (hashCode * 397) ^ (string.IsNullOrEmpty(ContentType) ? 0 : ContentType.GetHashCode()); hashCode = (hashCode * 397) ^ (Author == null ? 0 : Author.GetHashCode()); hashCode = (hashCode * 397) ^ (CreatedOn == null ? 0 : CreatedOn.Value.GetHashCode()); hashCode = (hashCode * 397) ^ (string.IsNullOrEmpty(Description) ? 0 : Description.GetHashCode()); hashCode = (hashCode * 397) ^ (string.IsNullOrEmpty(ContentUrl) ? 0 : ContentUrl.GetHashCode()); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = (FullPath != null ? FullPath.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Filename != null ? Filename.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Extension != null ? Extension.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FormatName != null ? FormatName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BitRate != null ? BitRate.GetHashCode() : 0); hashCode = (hashCode * 397) ^ FileSize.GetHashCode(); hashCode = (hashCode * 397) ^ DurationInSecs.GetHashCode(); hashCode = (hashCode * 397) ^ VideoStream.GetHashCode(); hashCode = (hashCode * 397) ^ AudioStream.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (ResourceName.Length != 0) { hash ^= ResourceName.GetHashCode(); } if (id_ != null) { hash ^= Id.GetHashCode(); } if (Type != 0) { hash ^= Type.GetHashCode(); } if (MimeType != 0) { hash ^= MimeType.GetHashCode(); } if (sourceUrl_ != null) { hash ^= SourceUrl.GetHashCode(); } if (name_ != null) { hash ^= Name.GetHashCode(); } if (fileSize_ != null) { hash ^= FileSize.GetHashCode(); } if (mediatypeCase_ == MediatypeOneofCase.Image) { hash ^= Image.GetHashCode(); } if (mediatypeCase_ == MediatypeOneofCase.MediaBundle) { hash ^= MediaBundle.GetHashCode(); } hash ^= (int)mediatypeCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns> public override int GetHashCode() { var hashCode = Constants.HashInitializer; unchecked { hashCode = Constants.HashMultiplier * hashCode + IsFolder.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + (AccessRights != null ? AccessRights.GetHashCode() : 0); hashCode = Constants.HashMultiplier * hashCode + Number.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + (Owner != null ? Owner.GetHashCode() : 0); hashCode = Constants.HashMultiplier * hashCode + (Group != null ? Group.GetHashCode() : 0); hashCode = Constants.HashMultiplier * hashCode + FileSize.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + Created.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + (Name != null ? Name.GetHashCode() : 0); } return(hashCode); }
public override int GetHashCode() { var hashCode = 317608122; hashCode = hashCode * -1521134295 + base.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FileName); hashCode = hashCode * -1521134295 + FileSize.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ContentType); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Description); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ContentUrl); hashCode = hashCode * -1521134295 + EqualityComparer <IdentifiableName> .Default.GetHashCode(Author); hashCode = hashCode * -1521134295 + EqualityComparer <DateTime?> .Default.GetHashCode(CreatedOn); return(hashCode); }
public override int GetHashCode() { int hashCode = -1371790424; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FileId); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FileUniqueId); hashCode = hashCode * -1521134295 + Duration.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Performer); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Title); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FileName); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(MimeType); hashCode = hashCode * -1521134295 + FileSize.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <PhotoSize> .Default.GetHashCode(Thumb); return(hashCode); }
public override int GetHashCode() { int hash = 1; if (FileName.Length != 0) { hash ^= FileName.GetHashCode(); } if (StarPos != 0L) { hash ^= StarPos.GetHashCode(); } if (Bytes.Length != 0) { hash ^= Bytes.GetHashCode(); } if (SendLength != 0) { hash ^= SendLength.GetHashCode(); } if (FileType.Length != 0) { hash ^= FileType.GetHashCode(); } if (FileSize != 0L) { hash ^= FileSize.GetHashCode(); } if (FilePath.Length != 0) { hash ^= FilePath.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.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 (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); } }
public override int GetHashCode() { return(FileSize.GetHashCode() ^ FileName.GetHashCode()); }
public void HashCode_Is_Equal_For_Same_Size() { var sut = new FileSize(5); sut.GetHashCode().Should().Be(new FileSize(5).GetHashCode()); }