Ejemplo n.º 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 (Class != null)
                {
                    hashCode = hashCode * 59 + Class.GetHashCode();
                }
                if (AssignedLabels != null)
                {
                    hashCode = hashCode * 59 + AssignedLabels.GetHashCode();
                }
                if (Mode != null)
                {
                    hashCode = hashCode * 59 + Mode.GetHashCode();
                }
                if (NodeDescription != null)
                {
                    hashCode = hashCode * 59 + NodeDescription.GetHashCode();
                }
                if (NodeName != null)
                {
                    hashCode = hashCode * 59 + NodeName.GetHashCode();
                }

                hashCode = hashCode * 59 + NumExecutors.GetHashCode();
                if (Description != null)
                {
                    hashCode = hashCode * 59 + Description.GetHashCode();
                }
                if (Jobs != null)
                {
                    hashCode = hashCode * 59 + Jobs.GetHashCode();
                }
                if (PrimaryView != null)
                {
                    hashCode = hashCode * 59 + PrimaryView.GetHashCode();
                }

                hashCode = hashCode * 59 + QuietingDown.GetHashCode();

                hashCode = hashCode * 59 + SlaveAgentPort.GetHashCode();
                if (UnlabeledLoad != null)
                {
                    hashCode = hashCode * 59 + UnlabeledLoad.GetHashCode();
                }

                hashCode = hashCode * 59 + UseCrumbs.GetHashCode();

                hashCode = hashCode * 59 + UseSecurity.GetHashCode();
                if (Views != null)
                {
                    hashCode = hashCode * 59 + Views.GetHashCode();
                }
                return(hashCode);
            }
        }