Ejemplo n.º 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);
        }
        public int GetHashCode(object obj)
        {
            int hashCode = (ClientRequestId.GetHashCode() + FileUri.GetHashCode() + RelativeUri.GetHashCode() + Started.GetHashCode()) / 4;

            Log.Debug($"hashCode {hashCode}");
            return(hashCode);
        }
 public override int GetHashCode()
 {
     return(RelativeUri.GetHashCode());
 }
Ejemplo n.º 4
0
        public void op_GetHashCode()
        {
            var obj = new RelativeUri("/");

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

            Assert.Equal(expected, actual);
        }