public void Dispose() { List <ListZone> list = Client.ListZones(TestZoneNameSuffix).ToList(); foreach (ListZone zone in list) { if (!zone.Name.EndsWith(TestZoneNameSuffix, StringComparison.OrdinalIgnoreCase)) { continue; } Client.DeleteZone(zone).Wait(); } }
public void Dispose() { List <DnsRecord> recs = _client.RecordsList(TestZoneName).Result; foreach (DnsRecord rec in recs) { _client.RecordsDelete(TestZoneName, rec.Id).Wait(); } bool deleted = _client.DeleteZone(TestZoneName).Result; if (!deleted) { throw new Exception("Unable to delete " + TestZoneName); } }