/// <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 (Uuid != null)
                {
                    hashCode = hashCode * 59 + Uuid.GetHashCode();
                }
                if (AgreementName != null)
                {
                    hashCode = hashCode * 59 + AgreementName.GetHashCode();
                }
                if (AgreementFileData != null)
                {
                    hashCode = hashCode * 59 + AgreementFileData.GetHashCode();
                }

                hashCode = hashCode * 59 + AutoUpdate.GetHashCode();
                if (SubRealmId != null)
                {
                    hashCode = hashCode * 59 + SubRealmId.GetHashCode();
                }
                return(hashCode);
            }
        }
Пример #2
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = base.GetHashCode();
         if (InterfaceUri != null)
         {
             result = (result * 397) ^ InterfaceUri.GetHashCode();
         }
         if (Name != null)
         {
             result = (result * 397) ^ Name.GetHashCode();
         }
         result = (result * 397) ^ AutoUpdate.GetHashCode();
         if (Requirements != null)
         {
             result = (result * 397) ^ Requirements.GetHashCode();
         }
         result = (result * 397) ^ CapabilityLists.GetSequencedHashCode();
         if (AccessPoints != null)
         {
             result = (result * 397) ^ AccessPoints.GetHashCode();
         }
         return(result);
     }
 }
Пример #3
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = base.GetHashCode();
         result = (result * 397) ^ InterfaceUri?.GetHashCode() ?? 0;
         result = (result * 397) ^ Name?.GetHashCode() ?? 0;
         result = (result * 397) ^ AutoUpdate.GetHashCode();
         result = (result * 397) ^ Requirements?.GetHashCode() ?? 0;
         result = (result * 397) ^ CapabilityLists.GetUnsequencedHashCode();
         result = (result * 397) ^ AccessPoints?.GetHashCode() ?? 0;
         return(result);
     }
 }