AuthZoneManager: added GetRecords() method to directly get the records without querying.

This commit is contained in:
Shreyas Zare
2021-03-27 16:37:46 +05:30
parent bdf40ac1aa
commit 5dfaad2c92

View File

@@ -549,6 +549,14 @@ namespace DnsServerCore.Dns.ZoneManagers
return records;
}
public IReadOnlyList<DnsResourceRecord> GetRecords(string domain, DnsResourceRecordType type)
{
if (_root.TryGet(domain, out AuthZone zone))
return zone.GetRecords(type);
return Array.Empty<DnsResourceRecord>();
}
public IReadOnlyList<DnsResourceRecord> QueryRecords(string domain, DnsResourceRecordType type)
{
if (_root.TryGet(domain, out AuthZone zone))