Beispiel #1
0
        /// <summary>
        /// Returns true if JuryoJohoResponse instances are equal
        /// </summary>
        /// <param name="other">Instance of JuryoJohoResponse to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(JuryoJohoResponse other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     JuryoTsuchi == other.JuryoTsuchi ||
                     JuryoTsuchi != null &&
                     JuryoTsuchi.Equals(other.JuryoTsuchi)
                     ) &&
                 (
                     ShogyoHojinKubun == other.ShogyoHojinKubun ||
                     ShogyoHojinKubun != null &&
                     ShogyoHojinKubun.Equals(other.ShogyoHojinKubun)
                 ) &&
                 (
                     UketsukeBangos == other.UketsukeBangos ||
                     UketsukeBangos != null &&
                     other.UketsukeBangos != null &&
                     UketsukeBangos.SequenceEqual(other.UketsukeBangos)
                 ));
        }
Beispiel #2
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 (JuryoTsuchi != null)
         {
             hashCode = hashCode * 59 + JuryoTsuchi.GetHashCode();
         }
         if (ShogyoHojinKubun != null)
         {
             hashCode = hashCode * 59 + ShogyoHojinKubun.GetHashCode();
         }
         if (UketsukeBangos != null)
         {
             hashCode = hashCode * 59 + UketsukeBangos.GetHashCode();
         }
         return(hashCode);
     }
 }