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

            if (HttpMethod != 0)
            {
                hash ^= HttpMethod.GetHashCode();
            }
            if (appEngineRouting_ != null)
            {
                hash ^= AppEngineRouting.GetHashCode();
            }
            if (RelativeUri.Length != 0)
            {
                hash ^= RelativeUri.GetHashCode();
            }
            hash ^= Headers.GetHashCode();
            if (Body.Length != 0)
            {
                hash ^= Body.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
        public int GetHashCode(object obj)
        {
            int hashCode = (ClientRequestId.GetHashCode() + FileUri.GetHashCode() + RelativeUri.GetHashCode() + Started.GetHashCode()) / 4;

            Log.Debug($"hashCode {hashCode}");
            return(hashCode);
        }
コード例 #3
0
 public override int GetHashCode()
 {
     return(RelativeUri.GetHashCode());
 }
コード例 #4
0
ファイル: RelativeUri.Facts.cs プロジェクト: KarlDirck/cavity
        public void op_GetHashCode()
        {
            var obj = new RelativeUri("/");

            var expected = obj.ToString().GetHashCode();
            var actual = obj.GetHashCode();

            Assert.Equal(expected, actual);
        }