/// <summary>
 /// Get the hash code for this script.
 /// </summary>
 /// <remarks>The integrity hash will still be unique to the file, even moreso than the address. If the same file gets loaded with SRI hashes from two different sources they'll still be labeled the same file.</remarks>
 /// <returns></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return(((Src != null ? Src.GetHashCode() : 0) * 397) ^ (Integrity != null ? Integrity.GetHashCode() : 0));
     }
 }
Пример #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Size != 0D)
            {
                hash ^= Size.GetHashCode();
            }
            if (Src.Length != 0)
            {
                hash ^= Src.GetHashCode();
            }
            if (Shape.Length != 0)
            {
                hash ^= Shape.GetHashCode();
            }
            if (Label.Length != 0)
            {
                hash ^= Label.GetHashCode();
            }
            if (CustomLabel.Length != 0)
            {
                hash ^= CustomLabel.GetHashCode();
            }
            if (Zoom.Length != 0)
            {
                hash ^= Zoom.GetHashCode();
            }
            return(hash);
        }
Пример #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((Src != null ? Src.GetHashCode() : 0) * 397) ^ (int)Instruction);
     }
 }
Пример #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((Src != null ? Src.GetHashCode() : 0) * 397) ^ (Dst != null ? Dst.GetHashCode() : 0));
     }
 }
Пример #5
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (CompressionLevel != 0)
            {
                hash ^= CompressionLevel.GetHashCode();
            }
            hash ^= ciphers_.GetHashCode();
            if (Key.Length != 0)
            {
                hash ^= Key.GetHashCode();
            }
            if (Src.Length != 0)
            {
                hash ^= Src.GetHashCode();
            }
            if (Dest.Length != 0)
            {
                hash ^= Dest.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #6
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Returns HashCode</returns>
 public override int GetHashCode()
 {
     return(String.Format("{0}|{1}|{2}|",
                          Name?.GetHashCode() ?? 0,
                          Src?.GetHashCode() ?? 0,
                          Overwrite.GetHashCode()
                          ).GetHashCode());
 }
Пример #7
0
        public override int GetHashCode()
        {
            int hash = 13;

            hash = (hash * 7) + Src.GetHashCode();
            hash = (hash * 7) + Dest.GetHashCode();
            return(hash);
        }
Пример #8
0
 /// <summary>
 /// Serves as the default hash function.
 /// </summary>
 /// <returns>
 /// A hash code for the current object.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Src != null ? Src.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FocalPoint != null ? FocalPoint.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Crops != null ? Crops.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #9
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = 63;
         hash ^= hash * Src.GetHashCode();
         hash ^= hash * Dest.GetHashCode();
         return(hash);
     }
 }
Пример #10
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Action.GetHashCode();
         hashCode = (hashCode * 397) ^ (Src != null ? Src.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Dest != null ? Dest.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #11
0
 public override int GetHashCode()
 {
     unchecked
     {
         // properties are, practically, readonly
         // ReSharper disable NonReadonlyMemberInGetHashCode
         var hashCode = Src?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (FocalPoint?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Crops?.GetHashCode() ?? 0);
         return(hashCode);
         // ReSharper restore NonReadonlyMemberInGetHashCode
     }
 }
Пример #12
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Src.Length != 0)
            {
                hash ^= Src.GetHashCode();
            }
            if (Payload.Length != 0)
            {
                hash ^= Payload.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #13
0
 /// <summary>
 /// Get hash code
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return(Src == null ? 0 : Src.GetHashCode());
 }
Пример #14
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(Src != null?Src.GetHashCode() : 0);
 }
Пример #15
0
 public override int GetHashCode()
 {
     unchecked {
         return((Src.GetHashCode() * 397) ^ Dst.GetHashCode());
     }
 }