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

            return
                ((
                     Aufnr == other.Aufnr ||
                     Aufnr != null &&
                     Aufnr.Equals(other.Aufnr)
                     ) &&
                 (
                     Matchcode == other.Matchcode ||
                     Matchcode != null &&
                     Matchcode.Equals(other.Matchcode)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ));
        }
示例#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 (Aufnr != null)
         {
             hashCode = hashCode * 59 + Aufnr.GetHashCode();
         }
         if (Matchcode != null)
         {
             hashCode = hashCode * 59 + Matchcode.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         return(hashCode);
     }
 }