예제 #1
0
    /// <inheritdoc/>
    public override int GetHashCode()
    {
        int?GetLinkHashCode()
        {
#if NETSTANDARD2_0
            return(Link?.GetHashCode());
#else
            return(Link?.GetHashCode(StringComparison.Ordinal));
#endif
        }

        unchecked
        {
            var hash = (int)2166136261;
            hash = (hash * 16777619) ^ Foreground.GetHashCode();
            hash = (hash * 16777619) ^ Background.GetHashCode();
            hash = (hash * 16777619) ^ Decoration.GetHashCode();

            if (Link != null)
            {
                hash = (hash * 16777619) ^ GetLinkHashCode() ?? 0;
            }

            return(hash);
        }
    }
예제 #2
0
 public override int GetHashCode()
 {
     return
         (Background.GetHashCode() ^
          Foreground.GetHashCode() ^
          Char.GetHashCode());
 }
예제 #3
0
파일: ChunkStyle.cs 프로젝트: radtek/datawf
 public override int GetHashCode()
 {
     unchecked
     {
         return((Name != null ? Name.GetHashCode() : 0) ^ Foreground.GetHashCode() ^ Background.GetHashCode() ^ FontWeight.GetHashCode() ^ FontStyle.GetHashCode());
     }
 }
예제 #4
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = (int)2166136261;
         hash = (hash * 16777619) ^ Foreground.GetHashCode();
         hash = (hash * 16777619) ^ Background.GetHashCode();
         hash = (hash * 16777619) ^ Decoration.GetHashCode();
         return(hash);
     }
 }
예제 #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id.GetHashCode();
         hashCode = (hashCode * 397) ^ Value.GetHashCode();
         hashCode = (hashCode * 397) ^ (Foreground != null ? Foreground.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Background != null ? Background.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FontFamily != null ? FontFamily.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ FontSize.GetHashCode();
         return(hashCode);
     }
 }
예제 #6
0
        /// <inheritdoc/>
        public override int GetHashCode()
        {
            unchecked
            {
                var hash = (int)2166136261;
                hash = (hash * 16777619) ^ Foreground.GetHashCode();
                hash = (hash * 16777619) ^ Background.GetHashCode();
                hash = (hash * 16777619) ^ Decoration.GetHashCode();

                if (Link != null)
                {
                    hash = (hash * 16777619) ^ Link?.GetHashCode() ?? 0;
                }

                return(hash);
            }
        }
예제 #7
0
        public override int GetHashCode()
        {
            var hashCode = 29083839;

            hashCode = hashCode * -1521134295 + R.GetHashCode();
            hashCode = hashCode * -1521134295 + G.GetHashCode();
            hashCode = hashCode * -1521134295 + B.GetHashCode();
            hashCode = hashCode * -1521134295 + Foreground.GetHashCode();
            hashCode = hashCode * -1521134295 + Background.GetHashCode();
            hashCode = hashCode * -1521134295 + Pixal.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Hex);

            hashCode = hashCode * -1521134295 + EqualityComparer <Color> .Default.GetHashCode(Color);

            hashCode = hashCode * -1521134295 + Code.GetHashCode();
            return(hashCode);
        }
예제 #8
0
파일: Program.cs 프로젝트: atifaziz/recolor
 public override int GetHashCode() =>
 unchecked ((Foreground.GetHashCode() * 397) ^ Background.GetHashCode());
예제 #9
0
 /// <summary>
 /// Generate a hash code for the value.
 /// </summary>
 /// <returns>The hash code.</returns>
 public override int GetHashCode() =>
 (Foreground?.GetHashCode() ?? 0) ^
 (Background?.GetHashCode() ?? 0);
예제 #10
0
 public override int GetHashCode()
 {
     return(Text.GetHashCode() * Background.GetHashCode() * Foreground.GetHashCode());
 }
예제 #11
0
 public override int GetHashCode()
 => Character.GetHashCode() + Foreground.GetHashCode() + Background.GetHashCode();
예제 #12
0
 /// <summary>
 /// Returns a hash code for this <see cref="Color"/>.
 /// </summary>
 /// <returns>
 /// A hash code for this <see cref="Color"/>, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode()
 {
     return((Foreground?.GetHashCode() ?? 0) ^ (Background?.GetHashCode() ?? 0));
 }
예제 #13
0
 public override int GetHashCode()
 {
     return(Hash.Combine(Foreground?.GetHashCode() ?? -1, Background?.GetHashCode() ?? -1));
 }