Ejemplo n.º 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 (UID != null)
         {
             hashCode = hashCode * 59 + UID.GetHashCode();
         }
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (Category != null)
         {
             hashCode = hashCode * 59 + Category.GetHashCode();
         }
         if (Listed != null)
         {
             hashCode = hashCode * 59 + Listed.GetHashCode();
         }
         if (SupportedBridgeTypeUIDs != null)
         {
             hashCode = hashCode * 59 + SupportedBridgeTypeUIDs.GetHashCode();
         }
         if (Bridge != null)
         {
             hashCode = hashCode * 59 + Bridge.GetHashCode();
         }
         if (Channels != null)
         {
             hashCode = hashCode * 59 + Channels.GetHashCode();
         }
         if (ChannelGroups != null)
         {
             hashCode = hashCode * 59 + ChannelGroups.GetHashCode();
         }
         if (ConfigParameters != null)
         {
             hashCode = hashCode * 59 + ConfigParameters.GetHashCode();
         }
         if (ParameterGroups != null)
         {
             hashCode = hashCode * 59 + ParameterGroups.GetHashCode();
         }
         if (Properties != null)
         {
             hashCode = hashCode * 59 + Properties.GetHashCode();
         }
         if (ExtensibleChannelTypeIds != null)
         {
             hashCode = hashCode * 59 + ExtensibleChannelTypeIds.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>
        /// Returns true if StrippedThingTypeDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of StrippedThingTypeDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(StrippedThingTypeDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     UID == input.UID ||
                     (UID != null &&
                      UID.Equals(input.UID))
                     ) &&
                 (
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                 ) &&
                 (
                     Description == input.Description ||
                     (Description != null &&
                      Description.Equals(input.Description))
                 ) &&
                 (
                     Category == input.Category ||
                     (Category != null &&
                      Category.Equals(input.Category))
                 ) &&
                 (
                     Listed == input.Listed ||
                     (Listed != null &&
                      Listed.Equals(input.Listed))
                 ) &&
                 (
                     SupportedBridgeTypeUIDs == input.SupportedBridgeTypeUIDs ||
                     SupportedBridgeTypeUIDs != null &&
                     SupportedBridgeTypeUIDs.SequenceEqual(input.SupportedBridgeTypeUIDs)
                 ) &&
                 (
                     Bridge == input.Bridge ||
                     (Bridge != null &&
                      Bridge.Equals(input.Bridge))
                 ));
        }
Ejemplo n.º 3
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = Uid != null?Uid.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (Label != null ? Label.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ Listed.GetHashCode();
                hashCode = (hashCode * 397) ^ (SupportedBridgeTypeUiDs != null
                               ? SupportedBridgeTypeUiDs.GetHashCode()
                               : 0);
                hashCode = (hashCode * 397) ^ Bridge.GetHashCode();
                hashCode = (hashCode * 397) ^ (Channels != null ? Channels.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ChannelGroups != null ? ChannelGroups.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ConfigParameters != null ? ConfigParameters.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ParameterGroups != null ? ParameterGroups.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Properties != null ? Properties.GetHashCode() : 0);
                return(hashCode);
            }
        }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (UID != null)
         {
             hashCode = hashCode * 59 + UID.GetHashCode();
         }
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (Category != null)
         {
             hashCode = hashCode * 59 + Category.GetHashCode();
         }
         if (Listed != null)
         {
             hashCode = hashCode * 59 + Listed.GetHashCode();
         }
         if (SupportedBridgeTypeUIDs != null)
         {
             hashCode = hashCode * 59 + SupportedBridgeTypeUIDs.GetHashCode();
         }
         if (Bridge != null)
         {
             hashCode = hashCode * 59 + Bridge.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Returns true if ThingTypeDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of ThingTypeDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ThingTypeDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     UID == input.UID ||
                     (UID != null &&
                      UID.Equals(input.UID))
                     ) &&
                 (
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                 ) &&
                 (
                     Description == input.Description ||
                     (Description != null &&
                      Description.Equals(input.Description))
                 ) &&
                 (
                     Category == input.Category ||
                     (Category != null &&
                      Category.Equals(input.Category))
                 ) &&
                 (
                     Listed == input.Listed ||
                     (Listed != null &&
                      Listed.Equals(input.Listed))
                 ) &&
                 (
                     SupportedBridgeTypeUIDs == input.SupportedBridgeTypeUIDs ||
                     SupportedBridgeTypeUIDs != null &&
                     SupportedBridgeTypeUIDs.SequenceEqual(input.SupportedBridgeTypeUIDs)
                 ) &&
                 (
                     Bridge == input.Bridge ||
                     (Bridge != null &&
                      Bridge.Equals(input.Bridge))
                 ) &&
                 (
                     Channels == input.Channels ||
                     Channels != null &&
                     Channels.SequenceEqual(input.Channels)
                 ) &&
                 (
                     ChannelGroups == input.ChannelGroups ||
                     ChannelGroups != null &&
                     ChannelGroups.SequenceEqual(input.ChannelGroups)
                 ) &&
                 (
                     ConfigParameters == input.ConfigParameters ||
                     ConfigParameters != null &&
                     ConfigParameters.SequenceEqual(input.ConfigParameters)
                 ) &&
                 (
                     ParameterGroups == input.ParameterGroups ||
                     ParameterGroups != null &&
                     ParameterGroups.SequenceEqual(input.ParameterGroups)
                 ) &&
                 (
                     Properties == input.Properties ||
                     Properties != null &&
                     Properties.SequenceEqual(input.Properties)
                 ) &&
                 (
                     ExtensibleChannelTypeIds == input.ExtensibleChannelTypeIds ||
                     ExtensibleChannelTypeIds != null &&
                     ExtensibleChannelTypeIds.SequenceEqual(input.ExtensibleChannelTypeIds)
                 ));
        }