Beispiel #1
0
        /// <summary>
        /// Removes a DNS record from the zone
        /// </summary>
        /// <param name="record">Record to be removed</param>
        /// <returns>True if the record was removed, otherwise false</returns>
        public virtual bool TryDeleteRecord(DnsRecord record)
        {
            if (record == null)
            {
                return(false);
            }

            try
            {
                DeleteRecord(record);
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Adds a DNS record to the zone
        /// </summary>
        /// <param name="recordTemplate">Template record to be added</param>
        /// <param name="record">Resulting created record</param>
        /// <returns>True if the record was created, otherwise false</returns>
        public virtual bool TryCreateRecord(DnsRecord recordTemplate, out DnsRecord record)
        {
            if (recordTemplate == null)
            {
                record = null;
                return(false);
            }

            try
            {
                record = CreateRecord(recordTemplate);
                return(true);
            }
            catch (Exception)
            {
                record = null;
                return(false);
            }
        }
Beispiel #3
0
 /// <summary>
 /// Removes a DNS record from the zone
 /// </summary>
 /// <param name="record">Record to be removed</param>
 public abstract void DeleteRecord(DnsRecord record);
Beispiel #4
0
 /// <summary>
 /// Updates a DNS record
 /// </summary>
 /// <param name="record">True if the record was updated, otherwise false</param>
 public abstract void SaveRecord(DnsRecord record);
Beispiel #5
0
 /// <summary>
 /// Adds a DNS record to the zone
 /// </summary>
 /// <param name="recordTemplate">Template record to be added</param>
 /// <returns>Resulting created record</returns>
 public abstract DnsRecord CreateRecord(DnsRecord recordTemplate);