AuthZoneInfo: implemented RefreshZone() method to allow refreshing secondary & stub zones.

This commit is contained in:
Shreyas Zare
2020-06-13 17:27:55 +05:30
parent 752958102b
commit 7f9d4fa063

View File

@@ -125,6 +125,26 @@ namespace DnsServerCore.Dns.Zones
return _zone.GetRecords(type);
}
public void RefreshZone()
{
if (_zone == null)
throw new InvalidOperationException();
switch (_type)
{
case AuthZoneType.Secondary:
(_zone as SecondaryZone).RefreshZone();
break;
case AuthZoneType.Stub:
(_zone as StubZone).RefreshZone();
break;
default:
throw new InvalidOperationException();
}
}
public void WriteTo(BinaryWriter bW)
{
if (_zone == null)