Exemplo n.º 1
0
        public void GetHashCodeEqual(HashType hashType)
        {
            var h1 = new ContentHash(hashType, Zeros);
            var h2 = new ContentHash(hashType, Zeros);

            Assert.Equal(h1.GetHashCode(), h2.GetHashCode());
        }
Exemplo n.º 2
0
 private int ComputeHashCode()
 {
     return(HashCodeHelper.Combine(
                m_machineName.GetHashCode(),
                m_substSource.GetHashCode(),
                m_substTarget.GetHashCode(),
                m_preserveOutputSalt.GetHashCode()));
 }
 /// <summary>
 /// Get a hash code for the BlobHttpHeaders.
 /// </summary>
 /// <returns>Hash code for the BlobHttpHeaders.</returns>
 public override int GetHashCode()
 => CacheControl.GetHashCode()
 ^ ContentDisposition.GetHashCode()
 ^ ContentEncoding.GetHashCode()
 ^ ContentLanguage.GetHashCode()
 ^ ContentHash.GetHashCode()
 ^ ContentType.GetHashCode()
 ;
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Locations.SequenceHashCode();
         hashCode = (hashCode * 397) ^ ContentHash.GetHashCode();
         hashCode = (hashCode * 397) ^ Size.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 5
0
        public override int GetHashCode()
        {
            const int seed = 17;
            const int mul  = 31;

            var hash = seed;

            hash = hash + ResourceName.GetHashCode() * mul;
            hash = hash + RemoteName.GetHashCode() * mul;
            hash = hash + ContentHash.GetHashCode() * mul;
            hash = hash + Size.GetHashCode() * mul;

            return(hash);
        }
Exemplo n.º 6
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Hash.GetHashCode(), TimeToLive.GetHashCode(), Usn.GetHashCode(), Length.GetHashCode()));
 }
Exemplo n.º 7
0
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(File.Path.GetHashCode(), Hash.GetHashCode()));
 }
Exemplo n.º 8
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Type.GetHashCode(), Hash.GetHashCode(), PathEntry.GetHashCode()));
 }
Exemplo n.º 9
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Hash.GetHashCode(), RawLength.GetHashCode()));
 }
Exemplo n.º 10
0
 public override int GetHashCode()
 {
     return(base.GetHashCode() ^ ContentHash.GetHashCode() ^ ContentSize.GetHashCode() ^ ContentAlreadyExistsInCache.GetHashCode());
 }
Exemplo n.º 11
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Hash.GetHashCode(), SerializedLengthAndExistence.GetHashCode()));
 }
Exemplo n.º 12
0
 /// <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()
 {
     return(ContentHash.GetHashCode());
 }
Exemplo n.º 13
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(base.GetHashCode() ^ ContentHash.GetHashCode() ^ ContentSize.GetHashCode());
 }
Exemplo n.º 14
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(ContentHash.GetHashCode() ^ ByteComparer.GetHashCode(Output));
 }
Exemplo n.º 15
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(m_hash.GetHashCode());
 }