Exemple #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 (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Code != null)
         {
             hashCode = hashCode * 59 + Code.GetHashCode();
         }
         if (ChargingTriggerInfo != null)
         {
             hashCode = hashCode * 59 + ChargingTriggerInfo.GetHashCode();
         }
         if (Prices != null)
         {
             hashCode = hashCode * 59 + Prices.GetHashCode();
         }
         if (Minimum != null)
         {
             hashCode = hashCode * 59 + Minimum.GetHashCode();
         }
         if (Maximum != null)
         {
             hashCode = hashCode * 59 + Maximum.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #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 (Code != null)
         {
             hashCode = hashCode * 59 + Code.GetHashCode();
         }
         if (ChargingTriggerInfo != null)
         {
             hashCode = hashCode * 59 + ChargingTriggerInfo.GetHashCode();
         }
         if (EventLimitQuantity != null)
         {
             hashCode = hashCode * 59 + EventLimitQuantity.GetHashCode();
         }
         if (FreeEventQuantity != null)
         {
             hashCode = hashCode * 59 + FreeEventQuantity.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #3
0
        /// <summary>
        /// Returns true if ServiceBundleServiceDetail instances are equal
        /// </summary>
        /// <param name="other">Instance of ServiceBundleServiceDetail to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ServiceBundleServiceDetail other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Code == other.Code ||
                     Code != null &&
                     Code.Equals(other.Code)
                     ) &&
                 (
                     ChargingTriggerInfo == other.ChargingTriggerInfo ||
                     ChargingTriggerInfo != null &&
                     ChargingTriggerInfo.Equals(other.ChargingTriggerInfo)
                 ) &&
                 (
                     EventLimitQuantity == other.EventLimitQuantity ||
                     EventLimitQuantity != null &&
                     EventLimitQuantity.Equals(other.EventLimitQuantity)
                 ) &&
                 (
                     FreeEventQuantity == other.FreeEventQuantity ||
                     FreeEventQuantity != null &&
                     FreeEventQuantity.Equals(other.FreeEventQuantity)
                 ));
        }
Exemple #4
0
        /// <summary>
        /// Returns true if AccountPriorityService instances are equal
        /// </summary>
        /// <param name="other">Instance of AccountPriorityService to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(AccountPriorityService other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                     ) &&
                 (
                     Code == other.Code ||
                     Code != null &&
                     Code.Equals(other.Code)
                 ) &&
                 (
                     ChargingTriggerInfo == other.ChargingTriggerInfo ||
                     ChargingTriggerInfo != null &&
                     ChargingTriggerInfo.Equals(other.ChargingTriggerInfo)
                 ) &&
                 (
                     Prices == other.Prices ||
                     Prices != null &&
                     Prices.SequenceEqual(other.Prices)
                 ) &&
                 (
                     Minimum == other.Minimum ||
                     Minimum != null &&
                     Minimum.Equals(other.Minimum)
                 ) &&
                 (
                     Maximum == other.Maximum ||
                     Maximum != null &&
                     Maximum.Equals(other.Maximum)
                 ));
        }