/// <summary> /// Tests for equality between the specified object and this /// code signer. Two code signers are considered equal if their /// signer certificate paths are equal and if their timestamps are equal, /// if present in both. /// </summary> /// <param name="obj"> the object to test for equality with this object. /// </param> /// <returns> true if the objects are considered equal, false otherwise. </returns> public override bool Equals(Object obj) { if (obj == null || (!(obj is CodeSigner))) { return(false); } CodeSigner that = (CodeSigner)obj; if (this == that) { return(true); } Timestamp thatTimestamp = that.Timestamp; if (Timestamp_Renamed == null) { if (thatTimestamp != null) { return(false); } } else { if (thatTimestamp == null || (!Timestamp_Renamed.Equals(thatTimestamp))) { return(false); } } return(SignerCertPath_Renamed.Equals(that.SignerCertPath)); }
/// <summary> /// Tests for equality between the specified object and this /// timestamp. Two timestamps are considered equal if the date and time of /// their timestamp's and their signer's certificate paths are equal. /// </summary> /// <param name="obj"> the object to test for equality with this timestamp. /// </param> /// <returns> true if the timestamp are considered equal, false otherwise. </returns> public override bool Equals(Object obj) { if (obj == null || (!(obj is Timestamp))) { return(false); } Timestamp that = (Timestamp)obj; if (this == that) { return(true); } return(Timestamp_Renamed.Equals(that.Timestamp) && SignerCertPath_Renamed.Equals(that.SignerCertPath)); }