From 72ff0edfc7fd8016a8cf18125cbad3a8378289e8 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 24 Apr 2021 12:10:30 +0530 Subject: [PATCH] AuthZoneInfo: code refactoring done. --- DnsServerCore/Dns/Zones/AuthZoneInfo.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DnsServerCore/Dns/Zones/AuthZoneInfo.cs b/DnsServerCore/Dns/Zones/AuthZoneInfo.cs index 32d4c7a9..219897f2 100644 --- a/DnsServerCore/Dns/Zones/AuthZoneInfo.cs +++ b/DnsServerCore/Dns/Zones/AuthZoneInfo.cs @@ -243,11 +243,11 @@ namespace DnsServerCore.Dns.Zones if (_zone == null) throw new InvalidOperationException(); - if (_zone is SecondaryZone) - return (_zone as SecondaryZone).IsExpired; + if (_zone is SecondaryZone secondaryZone) + return secondaryZone.IsExpired; - if (_zone is StubZone) - return (_zone as StubZone).IsExpired; + if (_zone is StubZone stubZone) + return stubZone.IsExpired; return false; } @@ -260,8 +260,8 @@ namespace DnsServerCore.Dns.Zones if (_zone == null) throw new InvalidOperationException(); - if (_zone is PrimaryZone) - return (_zone as PrimaryZone).Internal; + if (_zone is PrimaryZone primaryZone) + return primaryZone.Internal; return false; }