Ejemplo n.º 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);
        }
    }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     return
         (Background.GetHashCode() ^
          Foreground.GetHashCode() ^
          Char.GetHashCode());
 }
Ejemplo n.º 3
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Name != null ? Name.GetHashCode() : 0) ^ Foreground.GetHashCode() ^ Background.GetHashCode() ^ FontWeight.GetHashCode() ^ FontStyle.GetHashCode());
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 8
0
 public override int GetHashCode() =>
 unchecked ((Foreground.GetHashCode() * 397) ^ Background.GetHashCode());
Ejemplo n.º 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);
Ejemplo n.º 10
0
 public override int GetHashCode()
 {
     return(Text.GetHashCode() * Background.GetHashCode() * Foreground.GetHashCode());
 }
Ejemplo n.º 11
0
 public override int GetHashCode()
 => Character.GetHashCode() + Foreground.GetHashCode() + Background.GetHashCode();
Ejemplo n.º 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));
 }
Ejemplo n.º 13
0
 public override int GetHashCode()
 {
     return(Hash.Combine(Foreground?.GetHashCode() ?? -1, Background?.GetHashCode() ?? -1));
 }