public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.type) { hashcode = (hashcode * 397) + Type.GetHashCode(); } if (__isset.luid) { hashcode = (hashcode * 397) + Luid.GetHashCode(); } if (__isset.phones) { hashcode = (hashcode * 397) + TCollections.GetHashCode(Phones); } if (__isset.emails) { hashcode = (hashcode * 397) + TCollections.GetHashCode(Emails); } if (__isset.userids) { hashcode = (hashcode * 397) + TCollections.GetHashCode(Userids); } } return(hashcode); }
public void GetHashCodeTestForMaxValueReturned() { int expected = int.MaxValue; Luid target = new Luid(int.MaxValue, int.MaxValue); int actual = target.GetHashCode(); Assert.AreEqual(expected, actual); }
public void GetHashCodeTest() { var expected = 200; var target = new Luid(100, 100); var actual = target.GetHashCode(); Assert.AreEqual(expected, actual); }
public void GetHashCodeTest() { int expected = 200; Luid target = new Luid(100, 100); int actual = target.GetHashCode(); Assert.AreEqual(expected, actual); }
/// <summary>Returns a hash code for this <see cref="ModeInfo"/> structure.</summary> /// <returns>Returns a hash code for this <see cref="ModeInfo"/> structure.</returns> public override int GetHashCode() { var value = (int)InfoType ^ Id ^ AdapterId.GetHashCode(); if (InfoType == ModeInfoType.Source) { value ^= sourceMode.GetHashCode(); } else if (InfoType == ModeInfoType.Target) { value ^= targetMode.GetHashCode(); } return(value); }
public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.contact) { hashcode = (hashcode * 397) + Contact.GetHashCode(); } if (__isset.luid) { hashcode = (hashcode * 397) + Luid.GetHashCode(); } if (__isset.contactType) { hashcode = (hashcode * 397) + ContactType.GetHashCode(); } if (__isset.contactKey) { hashcode = (hashcode * 397) + ContactKey.GetHashCode(); } } return(hashcode); }
public void ReturnsTheHashCodeAsExpected() { var target = new Luid(1, 2); Assert.AreEqual(3, target.GetHashCode()); }
public void GetHashCodeTestForMaxValueReturned() { int expected = int.MaxValue; Luid target = new Luid(int.MaxValue, int.MaxValue); int actual = target.GetHashCode(); Assert.AreEqual(expected, actual); }
public void GetHashCodeTest() { int expected = 200; Luid target = new Luid(100, 100); int actual = target.GetHashCode(); Assert.AreEqual(expected, actual); }