コード例 #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 (PurgeCompleted != null)
         {
             hashCode = hashCode * 59 + PurgeCompleted.GetHashCode();
         }
         if (CompletedAge != null)
         {
             hashCode = hashCode * 59 + CompletedAge.GetHashCode();
         }
         if (PurgeActive != null)
         {
             hashCode = hashCode * 59 + PurgeActive.GetHashCode();
         }
         if (ActiveAge != null)
         {
             hashCode = hashCode * 59 + ActiveAge.GetHashCode();
         }
         if (SaveThreshold != null)
         {
             hashCode = hashCode * 59 + SaveThreshold.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #2
0
        /// <summary>
        /// Returns true if ComAdobeGraniteTaskmanagementImplPurgeTaskPurgeMaintenanceTaskProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeGraniteTaskmanagementImplPurgeTaskPurgeMaintenanceTaskProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeGraniteTaskmanagementImplPurgeTaskPurgeMaintenanceTaskProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     PurgeCompleted == other.PurgeCompleted ||
                     PurgeCompleted != null &&
                     PurgeCompleted.Equals(other.PurgeCompleted)
                     ) &&
                 (
                     CompletedAge == other.CompletedAge ||
                     CompletedAge != null &&
                     CompletedAge.Equals(other.CompletedAge)
                 ) &&
                 (
                     PurgeActive == other.PurgeActive ||
                     PurgeActive != null &&
                     PurgeActive.Equals(other.PurgeActive)
                 ) &&
                 (
                     ActiveAge == other.ActiveAge ||
                     ActiveAge != null &&
                     ActiveAge.Equals(other.ActiveAge)
                 ) &&
                 (
                     SaveThreshold == other.SaveThreshold ||
                     SaveThreshold != null &&
                     SaveThreshold.Equals(other.SaveThreshold)
                 ));
        }