public bool Equals(TestClass other) { var result = String == other.String && DateTime == other.DateTime && Sub.Equals(other.Sub) && Int32s.Count == other.Int32s.Count; if (result) { var count = Int32s.Count; for (var i = 0; i < count; i++) { if (Int32s[i] != other.Int32s[i]) { return(false); } } } return(result); }
/// <summary> /// Returns true if JWToken instances are equal /// </summary> /// <param name="other">Instance of JWToken to be compared</param> /// <returns>Boolean</returns> public bool Equals(JWToken other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Iss == other.Iss || Iss != null && Iss.Equals(other.Iss) ) && ( Sub == other.Sub || Sub != null && Sub.Equals(other.Sub) ) && ( Aud == other.Aud || Aud != null && Aud.Equals(other.Aud) ) && ( Exp == other.Exp || Exp != null && Exp.Equals(other.Exp) ) && ( Nbf == other.Nbf || Nbf != null && Nbf.Equals(other.Nbf) ) && ( Iat == other.Iat || Iat != null && Iat.Equals(other.Iat) ) && ( Jti == other.Jti || Jti != null && Jti.Equals(other.Jti) ) && ( Uuid == other.Uuid || Uuid != null && Uuid.Equals(other.Uuid) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( GivenName == other.GivenName || GivenName != null && GivenName.Equals(other.GivenName) ) && ( Nickname == other.Nickname || Nickname != null && Nickname.Equals(other.Nickname) ) && ( Email == other.Email || Email != null && Email.Equals(other.Email) ) && ( EmailVerified == other.EmailVerified || EmailVerified != null && EmailVerified.Equals(other.EmailVerified) ) && ( Zoneinfo == other.Zoneinfo || Zoneinfo != null && Zoneinfo.Equals(other.Zoneinfo) ) && ( Locale == other.Locale || Locale != null && Locale.Equals(other.Locale) ) && ( Cnf == other.Cnf || Cnf != null && Cnf.Equals(other.Cnf) ) && ( Orig == other.Orig || Orig != null && Orig.Equals(other.Orig) ) && ( Dest == other.Dest || Dest != null && Dest.Equals(other.Dest) ) && ( Mky == other.Mky || Mky != null && Mky.Equals(other.Mky) )); }