/// <summary> /// Tests equality between this RR and the other <paramref name="record"/> /// </summary> /// <remarks> /// Compares all fields except TTL , since that can vary /// </remarks> /// <returns><c>true</c> if equal</returns> public virtual bool Equals(DnsResourceRecord record) { if (record == null) { return(false); } return( this.Type == record.Type && this.Class == record.Class && DnsStandard.Equals(this.Name, record.Name) ); }
/// <summary> /// Tests this instance for equality with the other <paramref name="question"/> /// </summary> /// <param name="question">The other question.</param> /// <returns><c>true</c> if the instances represent the same question, <c>false</c> otherwise.</returns> public bool Equals(DnsQuestion question) { if (question == null) { return(false); } return( DnsStandard.Equals(question.Domain, this.Domain) && question.Type == this.Type && question.Class == this.Class ); }
/// <summary> /// Tests equality between this CERT record and the other <paramref name="record"/>. /// </summary> /// <param name="record">The other record.</param> /// <returns><c>true</c> if the RRs are equal, <c>false</c> otherwise.</returns> public override bool Equals(DnsResourceRecord record) { if (!base.Equals(record)) { return(false); } CertRecord certRecord = record as CertRecord; if (certRecord == null) { return(false); } return( this.m_algorithm == certRecord.m_algorithm && this.m_certType == certRecord.m_certType && this.m_keyTag == certRecord.m_keyTag && DnsStandard.Equals(this.Cert.Name, certRecord.Cert.Name) ); }