public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CategoryName?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (CounterName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (InstanceName?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var result = InstanceName.GetHashCode();
         result ^= Type.GetHashCode();
         result ^= RegistrationTime.GetHashCode();
         return(result);
     }
 }
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = InstanceName != null?InstanceName.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (ServiceType != null ? ServiceType.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Domain != null ? Domain.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (int)InterfaceIndex;
                return(hashCode);
            }
        }
Ejemplo n.º 4
0
        public override int GetHashCode()
        {
            unchecked
            {
                const int multiplier = 31;
                int       hash       = GetType().GetHashCode();

                hash = hash * multiplier + Type.GetHashCode();
                hash = hash * multiplier + (InstanceName == null ? 0 : InstanceName.GetHashCode());

                return(hash);
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// See the base.
 /// </summary>
 public override int GetHashCode()
 {
     return(InstanceName.GetHashCode());
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Gets the hash code for this object
 /// </summary>
 /// <remarks>
 /// ActionInfo will be used as the key for a Dictionary, so we need to define
 /// how we want to hash code to behave so we don't have any unexpected behavior.
 /// In this case, it will be based off of the instance name
 /// </remarks>
 /// <returns>An int of the hash code</returns>
 public override int GetHashCode() => InstanceName.GetHashCode();