コード例 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (TrueAddress.Length != 0)
            {
                hash ^= TrueAddress.GetHashCode();
            }
            if (IsSecure != false)
            {
                hash ^= IsSecure.GetHashCode();
            }
            if (BuildNumber != 0)
            {
                hash ^= BuildNumber.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
 public override int GetHashCode()
 {
     unchecked {
         int hashCode = UserAgent?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (HttpMethod?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ IsSecure.GetHashCode();
         hashCode = (hashCode * 397) ^ (Host?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Port;
         hashCode = (hashCode * 397) ^ (Path?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Referrer?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ClientIpAddress?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Cookies?.GetCollectionHashCode(_cookieHashCodeExclusions) ?? 0);
         hashCode = (hashCode * 397) ^ (QueryString?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Data?.GetCollectionHashCode() ?? 0);
         return(hashCode);
     }
 }
コード例 #3
0
ファイル: RequestInfo.cs プロジェクト: MihaMarkic/Cyanometer
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = UserAgent == null ? 0 : UserAgent.GetHashCode();
         hashCode = (hashCode * 397) ^ (HttpMethod == null ? 0 : HttpMethod.GetHashCode());
         hashCode = (hashCode * 397) ^ IsSecure.GetHashCode();
         hashCode = (hashCode * 397) ^ (Host == null ? 0 : Host.GetHashCode());
         hashCode = (hashCode * 397) ^ Port;
         hashCode = (hashCode * 397) ^ (Path == null ? 0 : Path.GetHashCode());
         hashCode = (hashCode * 397) ^ (Referrer == null ? 0 : Referrer.GetHashCode());
         hashCode = (hashCode * 397) ^ (ClientIpAddress == null ? 0 : ClientIpAddress.GetHashCode());
         hashCode = (hashCode * 397) ^ (Cookies == null ? 0 : Cookies.GetCollectionHashCode(_cookieHashCodeExclusions));
         hashCode = (hashCode * 397) ^ (QueryString == null ? 0 : QueryString.GetCollectionHashCode());
         hashCode = (hashCode * 397) ^ (Data == null ? 0 : Data.GetCollectionHashCode());
         return(hashCode);
     }
 }
コード例 #4
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return((_endpoint.GetHashCode() ^ 963144320)
            ^ (IsMulticast.GetHashCode() ^ 1491585648)
            ^ (IsSecure.GetHashCode() ^ 1074623538));
 }