/// <summary> /// Returns the hash code for this instance. /// </summary> /// <returns>A 32-bit signed integer that is the hash code for this instance.</returns> public override int GetHashCode() { unchecked { var hashCode = Id.GetHashCode(); hashCode = (hashCode * 397) ^ (int)Type; hashCode = (hashCode * 397) ^ Connected.GetHashCode(); #if NETSTANDARD2_1 hashCode = (hashCode * 397) ^ (Name?.GetHashCode(StringComparison.InvariantCulture) ?? 0); hashCode = (hashCode * 397) ^ (Description?.GetHashCode(StringComparison.InvariantCulture) ?? 0); #else hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0); #endif return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (eventCase_ == EventOneofCase.Connected) { hash ^= Connected.GetHashCode(); } if (eventCase_ == EventOneofCase.Disconnected) { hash ^= Disconnected.GetHashCode(); } hash ^= (int)eventCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { return(Id.GetHashCode() + Connected.GetHashCode() + TelemetryState.GetHashCode() + TelemetryInterval.GetHashCode() + ConsoleColor.GetHashCode()); }