Example #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (YomisForSearch != null)
         {
             hashCode = hashCode * 59 + YomisForSearch.GetHashCode();
         }
         if (Kakusus != null)
         {
             hashCode = hashCode * 59 + Kakusus.GetHashCode();
         }
         if (RepRadicalCodes != null)
         {
             hashCode = hashCode * 59 + RepRadicalCodes.GetHashCode();
         }
         if (KosekiCode != null)
         {
             hashCode = hashCode * 59 + KosekiCode.GetHashCode();
         }
         if (MorohashiCode != null)
         {
             hashCode = hashCode * 59 + MorohashiCode.GetHashCode();
         }
         if (Image != null)
         {
             hashCode = hashCode * 59 + Image.GetHashCode();
         }
         return(hashCode);
     }
 }
Example #2
0
        /// <summary>
        /// Returns true if CharacterTokiResponseCharacterInfos instances are equal
        /// </summary>
        /// <param name="other">Instance of CharacterTokiResponseCharacterInfos to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CharacterTokiResponseCharacterInfos other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     YomisForSearch == other.YomisForSearch ||
                     YomisForSearch != null &&
                     YomisForSearch.Equals(other.YomisForSearch)
                     ) &&
                 (
                     Kakusus == other.Kakusus ||
                     Kakusus != null &&
                     Kakusus.Equals(other.Kakusus)
                 ) &&
                 (
                     RepRadicalCodes == other.RepRadicalCodes ||
                     RepRadicalCodes != null &&
                     RepRadicalCodes.Equals(other.RepRadicalCodes)
                 ) &&
                 (
                     KosekiCode == other.KosekiCode ||
                     KosekiCode != null &&
                     KosekiCode.Equals(other.KosekiCode)
                 ) &&
                 (
                     MorohashiCode == other.MorohashiCode ||
                     MorohashiCode != null &&
                     MorohashiCode.Equals(other.MorohashiCode)
                 ) &&
                 (
                     Image == other.Image ||
                     Image != null &&
                     Image.Equals(other.Image)
                 ) &&
                 (
                     Unicode == other.Unicode ||
                     Unicode != null &&
                     Unicode.Equals(other.Unicode)
                 ));
        }