Exemple #1
0
        public override int GetHashCode()
        {
            int hash = Text?.GetHashCode() ?? -1;

            hash ^= BackgroundColor.GetHashCode();
            hash ^= ForegroundColor.GetHashCode();
            hash ^= FontAttributes.GetHashCode();
            hash ^= FontSize.GetHashCode();
            hash ^= Command?.GetHashCode() ?? -1;
            hash ^= CommandParameter?.GetHashCode() ?? -1;
            return(hash);
        }
Exemple #2
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hashCode = FontFamily != null?FontFamily.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ FontSize.GetHashCode();
                hashCode = (hashCode * 397) ^ NamedSize.GetHashCode();
                hashCode = (hashCode * 397) ^ FontAttributes.GetHashCode();

                return(hashCode);
            }
        }