From dfe94052cfac4ada9c3b4b644f07babc68aa5899 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sun, 4 Feb 2024 18:18:41 +0530 Subject: [PATCH] DnsServiceWorker: code refactoring changes done. --- DnsServerWindowsService/DnsServiceWorker.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/DnsServerWindowsService/DnsServiceWorker.cs b/DnsServerWindowsService/DnsServiceWorker.cs index e44ae556..24f6537d 100644 --- a/DnsServerWindowsService/DnsServiceWorker.cs +++ b/DnsServerWindowsService/DnsServiceWorker.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2023 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ using TechnitiumLibrary.Net.Firewall; namespace DnsServerWindowsService { - public class DnsServiceWorker : BackgroundService + public sealed class DnsServiceWorker : BackgroundService { readonly DnsWebService _service; @@ -65,7 +65,7 @@ namespace DnsServerWindowsService return Task.CompletedTask; } - private void CheckFirewallEntries() + private static void CheckFirewallEntries() { string appPath = Assembly.GetEntryAssembly().Location; @@ -76,7 +76,7 @@ namespace DnsServerWindowsService AddWindowsFirewallEntry(appPath); } - private bool WindowsFirewallEntryExists(string appPath) + private static bool WindowsFirewallEntryExists(string appPath) { try { @@ -88,7 +88,7 @@ namespace DnsServerWindowsService } } - private bool AddWindowsFirewallEntry(string appPath) + private static bool AddWindowsFirewallEntry(string appPath) { try {