Exemple #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((MediaType?.GetHashCode() ?? 0) * 397) ^ CharSet.GetHashCode());
     }
 }
        public override int GetHashCode()
        {
            var hashCode = 316391695;

            hashCode = hashCode * -1521134295 + returnParameter.GetHashCode();
            hashCode = hashCode * -1521134295 + callingConvention.GetHashCode();
            hashCode = hashCode * -1521134295 + bestFitMapping.GetHashCode();
            hashCode = hashCode * -1521134295 + charSet.GetHashCode();
            hashCode = hashCode * -1521134295 + setLastError.GetHashCode();
            hashCode = hashCode * -1521134295 + throwOnUnmappableChar.GetHashCode();
            return(hashCode);
        }
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = ConnectionSettings != null?ConnectionSettings.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (ServerVersion != null ? ServerVersion.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (int)CharSetBehavior;
                hashCode = (hashCode * 397) ^ (CharSet != null ? CharSet.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (NationalCharSet != null ? NationalCharSet.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ NoBackslashEscapes.GetHashCode();
                hashCode = (hashCode * 397) ^ ReplaceLineBreaksWithCharFunction.GetHashCode();
                return(hashCode);
            }
        }
 /// <summary>
 /// This was moved into its own function that isn't virtual so that it could
 /// be called inside the object's constructor.
 /// </summary>
 /// <returns>The Object's hash code.</returns>
 private int CalculateHashCode()
 {
     unchecked
     {
         var result = (Bucket != null ? Bucket.GetHashCode() : 0);
         result = (result * 397) ^ (Key != null ? Key.GetHashCode() : 0);
         result = (result * 397) ^ (Value != null ? Value.GetHashCode() : 0);
         result = (result * 397) ^ (ContentType != null ? ContentType.GetHashCode() : 0);
         result = (result * 397) ^ (ContentEncoding != null ? ContentEncoding.GetHashCode() : 0);
         result = (result * 397) ^ (CharSet != null ? CharSet.GetHashCode() : 0);
         result = (result * 397) ^ (VectorClock != null ? VectorClock.GetHashCode() : 0);
         result = (result * 397) ^ (UserMetaData != null ? UserMetaData.GetHashCode() : 0);
         result = (result * 397) ^ (BinIndexes != null ? BinIndexes.GetHashCode() : 0);
         result = (result * 397) ^ (IntIndexes != null ? IntIndexes.GetHashCode() : 0);
         result = (result * 397) ^ LastModified.GetHashCode();
         result = (result * 397) ^ LastModifiedUsec.GetHashCode();
         result = (result * 397) ^ (Links != null ? Links.GetHashCode() : 0);
         result = (result * 397) ^ (_vtags != null ? _vtags.GetHashCode() : 0);
         return(result);
     }
 }