Example #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (MimeType.Length != 0)
            {
                hash ^= MimeType.GetHashCode();
            }
            if (VideoUri.Length != 0)
            {
                hash ^= VideoUri.GetHashCode();
            }
            hash ^= videoThumbnails_.GetHashCode();
            if (FrameRate != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FrameRate);
            }
            if (SignedUri.Length != 0)
            {
                hash ^= SignedUri.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (MimeType.Length != 0)
            {
                hash ^= MimeType.GetHashCode();
            }
            if (ImageThumbnail.Length != 0)
            {
                hash ^= ImageThumbnail.GetHashCode();
            }
            if (ImageUri.Length != 0)
            {
                hash ^= ImageUri.GetHashCode();
            }
            if (SignedUri.Length != 0)
            {
                hash ^= SignedUri.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((MimeType != null ? MimeType.GetHashCode() : 0) * 397) ^ (ImageData != null ? ImageData.GetHashCode() : 0));
     }
 }
Example #4
0
        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 (Content.Length != 0)
            {
                hash ^= Content.GetHashCode();
            }
            if (MimeType.Length != 0)
            {
                hash ^= MimeType.GetHashCode();
            }
            if (TimeSegmentStart.Length != 0)
            {
                hash ^= TimeSegmentStart.GetHashCode();
            }
            if (TimeSegmentEnd.Length != 0)
            {
                hash ^= TimeSegmentEnd.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #6
0
        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);
        }
Example #7
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((_mimeType != null ? _mimeType.GetHashCode() : 0) * 397) ^ (_names != null ? _names.Join("*").GetHashCode() : 0));
     }
 }
Example #8
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = 47;
         hashCode = (hashCode * 53) ^ Id.GetHashCode();
         hashCode = (hashCode * 53) ^ ResolvedId.GetHashCode();
         if (GivenUrl != null)
         {
             hashCode = (hashCode * 53) ^ GivenUrl.GetHashCode();
         }
         if (GivenTitle != null)
         {
             hashCode = (hashCode * 53) ^ GivenTitle.GetHashCode();
         }
         hashCode = (hashCode * 53) ^ IsFavorite.GetHashCode();
         hashCode = (hashCode * 53) ^ (int)Status;
         hashCode = (hashCode * 53) ^ TimeAdded.GetHashCode();
         hashCode = (hashCode * 53) ^ TimeUpdated.GetHashCode();
         hashCode = (hashCode * 53) ^ TimeRead.GetHashCode();
         hashCode = (hashCode * 53) ^ TimeFavorited.GetHashCode();
         hashCode = (hashCode * 53) ^ TimeSyncDatabaseAdded.GetHashCode();
         hashCode = (hashCode * 53) ^ TimeSyncDatabaseUpdated.GetHashCode();
         if (ResolvedTitle != null)
         {
             hashCode = (hashCode * 53) ^ ResolvedTitle.GetHashCode();
         }
         if (ResolvedUrl != null)
         {
             hashCode = (hashCode * 53) ^ ResolvedUrl.GetHashCode();
         }
         if (Excerpt != null)
         {
             hashCode = (hashCode * 53) ^ Excerpt.GetHashCode();
         }
         hashCode = (hashCode * 53) ^ IsArticle.GetHashCode();
         hashCode = (hashCode * 53) ^ IsIndex.GetHashCode();
         hashCode = (hashCode * 53) ^ ImageContent.GetHashCode();
         hashCode = (hashCode * 53) ^ VideoContent.GetHashCode();
         hashCode = (hashCode * 53) ^ WordCount.GetHashCode();
         if (AmpUrl != null)
         {
             hashCode = (hashCode * 53) ^ AmpUrl.GetHashCode();
         }
         if (Encoding != null)
         {
             hashCode = (hashCode * 53) ^ Encoding.GetHashCode();
         }
         if (MimeType != null)
         {
             hashCode = (hashCode * 53) ^ MimeType.GetHashCode();
         }
         if (LeadImage != null)
         {
             hashCode = (hashCode * 53) ^ LeadImage.GetHashCode();
         }
         return(hashCode);
     }
 }
Example #9
0
        public override int GetHashCode()
        {
            if (string.IsNullOrWhiteSpace(MimeType))
            {
                return(base.GetHashCode());
            }

            return(MimeType.GetHashCode( ));
        }
Example #10
0
 public override int GetHashCode()
 {
     var result = MimeType.GetHashCode() ^ PayloadType.GetHashCode() ^ ClockRate.GetHashCode();
     if (Parameters != null)
     {
         result = Parameters.DeepGetHashCode() ^ result;
     }
     return result;
 }
Example #11
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>
 /// A 32-bit signed integer that is the hash code for this instance.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = MimeType.GetHashCode();
         hashCode = (hashCode * 397) ^ IsIndexed.GetHashCode();
         hashCode = (hashCode * 397) ^ Quality;
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (MimeType?.GetHashCode() ?? 0);
         hash = hash * 23 + (MimeSubType?.GetHashCode() ?? 0);
         hash = hash * 23 + (Parameters?.GetHashCode() ?? 0);
         return(hash);
     }
 }
Example #13
0
        public override int GetHashCode()
        {
            var hash = MimeType.GetHashCode() * 31 + MimeSubType.GetHashCode();

            foreach (var parameter in Parameters)
            {
                hash += parameter.GetHashCode();
            }

            return(hash);
        }
Example #14
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = base.GetHashCode();
         result = (result * 397) ^ Value?.GetHashCode() ?? 0;
         result = (result * 397) ^ MimeType?.GetHashCode() ?? 0;
         result = (result * 397) ^ PerceivedType?.GetHashCode() ?? 0;
         return(result);
     }
 }
Example #15
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = MediaUrl?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (MimeType?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Caption?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AlternateText?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (FolderPath?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (FileName?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         // NOTE: Exclude Path from comparison to allow easy testing with randomized TemporaryFiles
         int hashCode = (SubDir != null ? SubDir.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Destination != null ? Destination.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (MimeType != null ? MimeType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ StartOffset.GetHashCode();
         hashCode = (hashCode * 397) ^ (OriginalSource != null ? OriginalSource.GetHashCode() : 0);
         return(hashCode);
     }
 }
Example #17
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CreatedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ UpdatedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ (DownloadLink != null ? DownloadLink.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FileId != null ? FileId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Filename != null ? Filename.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Hash != null ? Hash.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (MimeType != null ? MimeType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Size != null ? Size.Value : 0);
         return(hashCode);
     }
 }
Example #18
0
        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);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Content.Length != 0)
            {
                hash ^= Content.GetHashCode();
            }
            if (MimeType.Length != 0)
            {
                hash ^= MimeType.GetHashCode();
            }
            if (Key.Length != 0)
            {
                hash ^= Key.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #20
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = PartitionKey != null?PartitionKey.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (Id != null ? Id.GetHashCode() : 0);
                hashCode = (int)((hashCode * 397) ^ SizeBytes);
                hashCode = (hashCode * 397) ^ (MD5Hash != null ? MD5Hash.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ Width;
                hashCode = (hashCode * 397) ^ Height;
                hashCode = (hashCode * 397) ^ DateAddedUtc.GetHashCode();
                hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (MimeType != null ? MimeType.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (FileExtension != null ? FileExtension.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Tags != null ? Tags.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Thumbnails != null ? Thumbnails.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (int)ImageType;

                return(hashCode);
            }
        }
Example #21
0
        /// <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 (FileContents != null)
                {
                    hash = hash * 59 + FileContents.GetHashCode();
                }

                if (Description != null)
                {
                    hash = hash * 59 + Description.GetHashCode();
                }

                if (MimeType != null)
                {
                    hash = hash * 59 + MimeType.GetHashCode();
                }

                if (Type != null)
                {
                    hash = hash * 59 + Type.GetHashCode();
                }

                return(hash);
            }
        }
Example #22
0
 public override int GetHashCode()
 {
     return((MimeType?.GetHashCode() ?? 0) * 397 ^ (Names?.Join("*").GetHashCode() ?? 0));
 }
Example #23
0
 public override int GetHashCode()
 {
     unchecked {
         return(((Extension != null ? Extension.GetHashCode(StringComparison.OrdinalIgnoreCase) : 0) * 397) ^ (MimeType != null ? MimeType.GetHashCode(StringComparison.OrdinalIgnoreCase) : 0));
     }
 }
 public override int GetHashCode()
 {
     return(RequestUrl.GetHashCode() ^ MimeType.GetHashCode());
 }
Example #25
0
 public override int GetHashCode()
 {
     return(MimeType != null ? MimeType.GetHashCode() : 0);
 }
Example #26
0
        public override int GetHashCode()
        {
            int result = 17;

            unchecked
            {
                if (PathFromParent != null)
                {
                    result = (result * 31) + PathFromParent.GetHashCode();
                }

                result = (result * 31) + OffsetFromParent.GetHashCode();
                result = (result * 31) + Length.GetHashCode();
                if (MimeType != null)
                {
                    result = (result * 31) + MimeType.GetHashCode();
                }

                if (Hashes != null)
                {
                    foreach (var value_0 in Hashes)
                    {
                        result = result * 31;
                        if (value_0 != null)
                        {
                            result = (result * 31) + value_0.GetHashCode();
                        }
                    }
                }

                if (Properties != null)
                {
                    // Use xor for dictionaries to be order-independent.
                    int xor_0 = 0;
                    foreach (var value_1 in Properties)
                    {
                        xor_0 ^= value_1.Key.GetHashCode();
                        if (value_1.Value != null)
                        {
                            xor_0 ^= value_1.Value.GetHashCode();
                        }
                    }

                    result = (result * 31) + xor_0;
                }

                if (Tags != null)
                {
                    foreach (var value_2 in Tags)
                    {
                        result = result * 31;
                        if (value_2 != null)
                        {
                            result = (result * 31) + value_2.GetHashCode();
                        }
                    }
                }
            }

            return(result);
        }