Beispiel #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 (AirlineData != null)
         {
             hashCode = hashCode * 59 + AirlineData.GetHashCode();
         }
         if (Level3SummaryData != null)
         {
             hashCode = hashCode * 59 + Level3SummaryData.GetHashCode();
         }
         if (NumberOfInstallments != null)
         {
             hashCode = hashCode * 59 + NumberOfInstallments.GetHashCode();
         }
         if (OrderDate != null)
         {
             hashCode = hashCode * 59 + OrderDate.GetHashCode();
         }
         if (TypeInformation != null)
         {
             hashCode = hashCode * 59 + TypeInformation.GetHashCode();
         }
         return(hashCode);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Returns true if AdditionalOrderInput instances are equal
        /// </summary>
        /// <param name="other">Instance of AdditionalOrderInput to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(AdditionalOrderInput other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     AirlineData == other.AirlineData ||
                     AirlineData != null &&
                     AirlineData.Equals(other.AirlineData)
                     ) &&
                 (
                     Level3SummaryData == other.Level3SummaryData ||
                     Level3SummaryData != null &&
                     Level3SummaryData.Equals(other.Level3SummaryData)
                 ) &&
                 (
                     NumberOfInstallments == other.NumberOfInstallments ||
                     NumberOfInstallments != null &&
                     NumberOfInstallments.Equals(other.NumberOfInstallments)
                 ) &&
                 (
                     OrderDate == other.OrderDate ||
                     OrderDate != null &&
                     OrderDate.Equals(other.OrderDate)
                 ) &&
                 (
                     TypeInformation == other.TypeInformation ||
                     TypeInformation != null &&
                     TypeInformation.Equals(other.TypeInformation)
                 ));
        }