Пример #1
0
        /// <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));
        }
Пример #2
0
        /// <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));
        }
Пример #3
0
        /// <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));
        }
Пример #4
0
        /// <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
                );
        }
Пример #5
0
        /// <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
                );
        }