From 5dfaad2c92c7cb295e18ca338e4584d21f87f64d Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 27 Mar 2021 16:37:46 +0530 Subject: [PATCH] AuthZoneManager: added GetRecords() method to directly get the records without querying. --- DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs b/DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs index 6c354373..fe224605 100644 --- a/DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs +++ b/DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs @@ -549,6 +549,14 @@ namespace DnsServerCore.Dns.ZoneManagers return records; } + public IReadOnlyList GetRecords(string domain, DnsResourceRecordType type) + { + if (_root.TryGet(domain, out AuthZone zone)) + return zone.GetRecords(type); + + return Array.Empty(); + } + public IReadOnlyList QueryRecords(string domain, DnsResourceRecordType type) { if (_root.TryGet(domain, out AuthZone zone))