public override int GetHashCode() { int hash = 1; if (ClientIp.Length != 0) { hash ^= ClientIp.GetHashCode(); } if (ClientPort != 0) { hash ^= ClientPort.GetHashCode(); } if (Type.Length != 0) { hash ^= Type.GetHashCode(); } if (ConnectionId.Length != 0) { hash ^= ConnectionId.GetHashCode(); } if (ClientVersion.Length != 0) { hash ^= ClientVersion.GetHashCode(); } hash ^= Labels.GetHashCode(); hash ^= Headers.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (ClientType != global::AcFunDanmu.DeviceInfo.Types.PlatformType.KInvalid) { hash ^= ClientType.GetHashCode(); } if (DeviceId.Length != 0) { hash ^= DeviceId.GetHashCode(); } if (ClientIp.Length != 0) { hash ^= ClientIp.GetHashCode(); } if (AppVersion.Length != 0) { hash ^= AppVersion.GetHashCode(); } if (Channel.Length != 0) { hash ^= Channel.GetHashCode(); } if (appInfo_ != null) { hash ^= AppInfo.GetHashCode(); } if (deviceInfo_ != null) { hash ^= DeviceInfo.GetHashCode(); } if (envInfo_ != null) { hash ^= EnvInfo.GetHashCode(); } if (ClientPort != 0) { hash ^= ClientPort.GetHashCode(); } if (Location.Length != 0) { hash ^= Location.GetHashCode(); } if (Kpf.Length != 0) { hash ^= Kpf.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Returns the hash code for this instance. /// </summary> /// <returns>The hash code for this instance.</returns> public override int GetHashCode() { if (_cachedHashCode < 1) { unchecked { _cachedHashCode = (ClientIPAddress != null ? ClientIPAddress.GetHashCode() : 0); _cachedHashCode = (_cachedHashCode * 397) ^ ClientPort.GetHashCode(); _cachedHashCode = (_cachedHashCode * 397) ^ (ServerIPAddress != null ? ServerIPAddress.GetHashCode() : 0); _cachedHashCode = (_cachedHashCode * 397) ^ ServerPort.GetHashCode(); } } return(_cachedHashCode); }