From 72a72484d8d009ace50a52f09491348a17beee84 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sun, 7 Mar 2021 15:57:34 +0530 Subject: [PATCH] DnsService: deleted old service code replaced by net5 worker service. --- DnsService/App.config | 6 -- DnsService/DnsService.Designer.cs | 40 ---------- DnsService/DnsService.cs | 61 --------------- DnsService/DnsService.resx | 123 ------------------------------ 4 files changed, 230 deletions(-) delete mode 100644 DnsService/App.config delete mode 100644 DnsService/DnsService.Designer.cs delete mode 100644 DnsService/DnsService.cs delete mode 100644 DnsService/DnsService.resx diff --git a/DnsService/App.config b/DnsService/App.config deleted file mode 100644 index 4bfa0056..00000000 --- a/DnsService/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/DnsService/DnsService.Designer.cs b/DnsService/DnsService.Designer.cs deleted file mode 100644 index b496d83f..00000000 --- a/DnsService/DnsService.Designer.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace DnsService -{ - partial class DnsService - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - // - // DnsService - // - this.ServiceName = "DnsService"; - - } - - #endregion - } -} diff --git a/DnsService/DnsService.cs b/DnsService/DnsService.cs deleted file mode 100644 index 8982f463..00000000 --- a/DnsService/DnsService.cs +++ /dev/null @@ -1,61 +0,0 @@ -/* -Technitium DNS Server -Copyright (C) 2019 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 -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . - -*/ - -using DnsServerCore; -using System; -using System.ServiceProcess; - -namespace DnsService -{ - public partial class DnsService : ServiceBase - { - WebService _service; - - public DnsService() - { - InitializeComponent(); - } - - protected override void OnStart(string[] args) - { - _service = new WebService(getConfigFolder(), new Uri("https://go.technitium.com/?id=22")); - _service.Start(); - } - - /// - /// If the service file path has the configuration files, use it, otherwise use the localapppath folder. - /// - /// The configuration path. - private string getConfigFolder() - { - string userConfigFolder = String.Concat(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"\Technitium\DNSServer"); - - if (System.IO.Directory.Exists(Environment.CurrentDirectory)) - { - return Environment.CurrentDirectory; - } - return userConfigFolder; - } - - protected override void OnStop() - { - _service.Dispose(); - } - } -} diff --git a/DnsService/DnsService.resx b/DnsService/DnsService.resx deleted file mode 100644 index e5858cc2..00000000 --- a/DnsService/DnsService.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file