コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = TextSize.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)TextStyle;
         hashCode = (hashCode * 397) ^ TextColor.GetHashCode();
         hashCode = (hashCode * 397) ^ BackgroundColor.GetHashCode();
         hashCode = (hashCode * 397) ^ IsClickable.GetHashCode();
         hashCode = (hashCode * 397) ^ (ClickValue != null ? ClickValue.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #2
0
        public bool Equals(SharedSpan other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(TextSize.Equals(other.TextSize) &&
                   TextStyle.Equals(other.TextStyle) &&
                   TextColor.Equals(other.TextColor) &&
                   BackgroundColor.Equals(other.BackgroundColor) &&
                   IsClickable == other.IsClickable &&
                   Equals(ClickValue, other.ClickValue));
        }