コード例 #1
0
 /// <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
ファイル: DriveFile.cs プロジェクト: ywhe/PnP-Sites-Core
 /// <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
ファイル: PageHeadBuilder.cs プロジェクト: isaacli430/routech
 /// <summary>
 /// Get hash code
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return(Src == null ? 0 : Src.GetHashCode());
 }
コード例 #14
0
ファイル: Track.cs プロジェクト: kelsos/plugin
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(Src != null?Src.GetHashCode() : 0);
 }
コード例 #15
0
 public override int GetHashCode()
 {
     unchecked {
         return((Src.GetHashCode() * 397) ^ Dst.GetHashCode());
     }
 }