Exemplo n.º 1
0
        void Print(DnsRecord dnsRecord)
        {
            CommandUI.Print("RecordID", dnsRecord.ID);
            DnsResourceRecord resourceRecord = dnsRecord.Deserialize();

            m_printer.Print(resourceRecord);

            CommandUI.Print("CreateDate", dnsRecord.CreateDate);
            CommandUI.Print("UpdateDate", dnsRecord.UpdateDate);
            CommandUI.Print("Notes", dnsRecord.Notes);
        }
Exemplo n.º 2
0
        DnsRecord Find(DnsRecord record)
        {
            DnsRecord[] existingRecords = Client.GetMatchingDnsRecordsByType(record.DomainName, record.RecordType);
            if (existingRecords.IsNullOrEmpty())
            {
                return(null);
            }

            DnsResourceRecord testRecord = record.Deserialize();

            foreach (DnsRecord existingRecord in existingRecords)
            {
                DnsResourceRecord rr = existingRecord.Deserialize();
                if (rr.Equals(testRecord))
                {
                    return(existingRecord);
                }
            }

            return(null);
        }