public override int GetHashCode() { return(AccountID?.GetHashCode() ?? 0 ^ BucketID?.GetHashCode() ?? 0 ^ BucketName?.GetHashCode() ?? 0 ^ BucketType?.GetHashCode() ?? 0 ^ Revision.GetHashCode()); }
public override int GetHashCode() { unchecked { var hash = 17; hash = hash * 23 + VBucketServerMap.GetHashCode(); hash = hash * 23 + BucketType.GetHashCode(); hash = hash * 23 + Name.GetHashCode(); hash = hash * 23 + AuthType.GetHashCode(); hash = hash * 23 + NodeLocator.GetHashCode(); hash = hash * 23 + SaslPassword.GetHashCode(); hash = hash * 23 + Uuid.GetHashCode(); hash = hash * 23 + Nodes.GetCombinedHashcode(); return(hash); } }
/// <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 { int result = BucketType != null?BucketType.GetHashCode() : 0; result = (result * 397) ^ (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); } }