/// <summary> /// Tests equality between this PTR 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; } PtrRecord ptrRecord = record as PtrRecord; if (ptrRecord == null) { return false; } return (DnsStandard.Equals(this.m_domain, ptrRecord.m_domain)); }
/// <summary> /// Tests equality between this CName 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); } CNameRecord cnameRecord = record as CNameRecord; if (cnameRecord == null) { return(false); } return(DnsStandard.Equals(m_name, cnameRecord.CName)); }
/// <summary> /// Tests equality between this NS 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); } NSRecord nsRecord = record as NSRecord; if (nsRecord == null) { return(false); } return(DnsStandard.Equals(m_nameserver, nsRecord.NameServer)); }
/// <summary> /// Tests equality between this TXT 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); } MXRecord mxRecord = record as MXRecord; if (mxRecord == null) { return(false); } return( DnsStandard.Equals(m_exchange, mxRecord.m_exchange) && this.Preference == mxRecord.Preference ); }
/// <summary> /// Tests equality between this SOA 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); } SOARecord soaRecord = record as SOARecord; if (soaRecord == null) { return(false); } return( DnsStandard.Equals(m_mname, soaRecord.m_mname) && DnsStandard.Equals(m_rname, soaRecord.m_rname) && this.SerialNumber == soaRecord.SerialNumber && this.Refresh == soaRecord.Refresh && this.Retry == soaRecord.Retry && this.Expire == soaRecord.Expire && this.Minimum == soaRecord.Minimum ); }
/// <summary> /// Initializes a query for domain /// </summary> /// <param name="qType">The record type to query</param> /// <param name="domain">The domain to query.</param> public DnsRequest(DnsStandard.RecordType qType, string domain) : this(new DnsQuestion(domain, qType)) { }
/// <summary> /// Gets and sets the raw data for this RR /// Not all DNS Record are mapped to a custom object by this library. /// Dns Records not specifically parsed are turned into RawRecord objects /// </summary> /// <param name="name"></param> /// <param name="type"></param> /// <param name="record"></param> public RawRecord(string name, DnsStandard.RecordType type, byte[] record) : base(name, type) { this.RecordBytes = record; }