コード例 #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
ファイル: CNameRecord.cs プロジェクト: nagyistge/nhin-d.net35
        /// <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
ファイル: NSRecord.cs プロジェクト: ywangmaxmd/nhin-d
        /// <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
ファイル: SOARecord.cs プロジェクト: nagyistge/nhin-d.net35
        /// <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
                );
        }
コード例 #6
0
ファイル: DnsRequest.cs プロジェクト: DM-TOR/nhin-d
 /// <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))
 {
 }
コード例 #7
0
ファイル: RawRecord.cs プロジェクト: DM-TOR/nhin-d
 /// <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;
 }