public override int GetHashCode() { unchecked { var hashCode = (int)Rev; hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Uri != null ? Uri.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (StreamingUri != null ? StreamingUri.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Nodes != null ? Nodes.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (NodesExt != null ? NodesExt.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (NodeLocator != null ? NodeLocator.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Uuid != null ? Uuid.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Ddocs != null ? Ddocs.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (VBucketServerMap != null ? VBucketServerMap.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BucketCapabilitiesVer != null ? BucketCapabilitiesVer.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BucketCapabilities != null ? BucketCapabilities.GetHashCode() : 0); return(hashCode); } }
public void Test_GetHashcode() { Assert.AreEqual(_vBucketServerMap1.GetHashCode(), _vBucketServerMap2.GetHashCode()); Assert.AreNotEqual(_vBucketServerMap1.GetHashCode(), _vBucketServerMap3.GetHashCode()); }