Example #1
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 (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (Category != null)
         {
             hashCode = hashCode * 59 + Category.GetHashCode();
         }
         if (ConfigDescriptionURI != null)
         {
             hashCode = hashCode * 59 + ConfigDescriptionURI.GetHashCode();
         }
         if (Multiple != null)
         {
             hashCode = hashCode * 59 + Multiple.GetHashCode();
         }
         return(hashCode);
     }
 }
Example #2
0
        /// <summary>
        /// Returns true if ConfigurableServiceDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of ConfigurableServiceDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ConfigurableServiceDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Id == input.Id ||
                     (Id != null &&
                      Id.Equals(input.Id))
                     ) &&
                 (
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                 ) &&
                 (
                     Category == input.Category ||
                     (Category != null &&
                      Category.Equals(input.Category))
                 ) &&
                 (
                     ConfigDescriptionURI == input.ConfigDescriptionURI ||
                     (ConfigDescriptionURI != null &&
                      ConfigDescriptionURI.Equals(input.ConfigDescriptionURI))
                 ) &&
                 (
                     Multiple == input.Multiple ||
                     (Multiple != null &&
                      Multiple.Equals(input.Multiple))
                 ));
        }