public override int GetHashCode() { int hashCode = -614027011; if (Context != null) { hashCode += Context.GetHashCode(); } if (Errors != null) { hashCode += Errors.GetHashCode(); } if (Limits != null) { hashCode += Limits.GetHashCode(); } if (StandardUnitDescriptionGroup != null) { hashCode += StandardUnitDescriptionGroup.GetHashCode(); } return(hashCode); }
public void Equals() { var a = new Limits(1); var b = new Limits(1); Assert.That(a.Equals(a), Is.True); Assert.That(a.Equals(b), Is.True); Assert.That(a.Equals(null), Is.False); Assert.That(a.Equals((object)a), Is.True); Assert.That(a.Equals((object)b), Is.True); Assert.That(a.Equals((object)null), Is.False); Assert.That(a.GetHashCode(), Is.EqualTo(b.GetHashCode())); Assert.That(a == b, Is.True); Assert.That(a != b, Is.False); }
public override int GetHashCode() { return(ServerId ^ Tenant ^ User.GetHashCode() ^ ConnectionString.GetHashCode() ^ Logger.GetHashCode() ^ Limits.GetHashCode() ^ DnsPresets.GetHashCode()); }