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

            return
                ((
                     ProviderName == input.ProviderName ||
                     ProviderName != null &&
                     ProviderName.Equals(input.ProviderName)
                     ) &&
                 (
                     MerchantSuppliedId == input.MerchantSuppliedId ||
                     MerchantSuppliedId != null &&
                     MerchantSuppliedId.Equals(input.MerchantSuppliedId)
                 ) &&
                 (
                     IsActive == input.IsActive ||
                     IsActive != null &&
                     IsActive.Equals(input.IsActive)
                 ) &&
                 (
                     IsOrderProtocolPos == input.IsOrderProtocolPos ||
                     IsOrderProtocolPos != null &&
                     IsOrderProtocolPos.Equals(input.IsOrderProtocolPos)
                 ) &&
                 (
                     AutoReleaseEnabled == input.AutoReleaseEnabled ||
                     AutoReleaseEnabled != null &&
                     AutoReleaseEnabled.Equals(input.AutoReleaseEnabled)
                 ) &&
                 (
                     AutoReleaseDistance == input.AutoReleaseDistance ||
                     AutoReleaseDistance != null &&
                     AutoReleaseDistance.Equals(input.AutoReleaseDistance)
                 ) &&
                 (
                     SpecialInstructionsMaxLength == input.SpecialInstructionsMaxLength ||
                     SpecialInstructionsMaxLength != null &&
                     SpecialInstructionsMaxLength.Equals(input.SpecialInstructionsMaxLength)
                 ) &&
                 (
                     CurrentDeactivations == input.CurrentDeactivations ||
                     CurrentDeactivations != null &&
                     CurrentDeactivations.SequenceEqual(input.CurrentDeactivations)
                 ));
        }
示例#2
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (ProviderName != null)
         {
             hashCode = hashCode * 59 + ProviderName.GetHashCode();
         }
         if (MerchantSuppliedId != null)
         {
             hashCode = hashCode * 59 + MerchantSuppliedId.GetHashCode();
         }
         if (IsActive != null)
         {
             hashCode = hashCode * 59 + IsActive.GetHashCode();
         }
         if (IsOrderProtocolPos != null)
         {
             hashCode = hashCode * 59 + IsOrderProtocolPos.GetHashCode();
         }
         if (AutoReleaseEnabled != null)
         {
             hashCode = hashCode * 59 + AutoReleaseEnabled.GetHashCode();
         }
         if (AutoReleaseDistance != null)
         {
             hashCode = hashCode * 59 + AutoReleaseDistance.GetHashCode();
         }
         if (SpecialInstructionsMaxLength != null)
         {
             hashCode = hashCode * 59 + SpecialInstructionsMaxLength.GetHashCode();
         }
         if (CurrentDeactivations != null)
         {
             hashCode = hashCode * 59 + CurrentDeactivations.GetHashCode();
         }
         return(hashCode);
     }
 }