From 61005bb1b964a726e1828e778f53d4563484f197 Mon Sep 17 00:00:00 2001 From: Lucca Faria Ferri Date: Mon, 6 Feb 2023 10:36:40 -0800 Subject: [PATCH] Small changes relating to config class names. --- src/DiIiS-NA/REST/Config.cs | 18 --------------- src/DiIiS-NA/REST/RestConfig.cs | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 18 deletions(-) delete mode 100644 src/DiIiS-NA/REST/Config.cs create mode 100644 src/DiIiS-NA/REST/RestConfig.cs diff --git a/src/DiIiS-NA/REST/Config.cs b/src/DiIiS-NA/REST/Config.cs deleted file mode 100644 index c51e564..0000000 --- a/src/DiIiS-NA/REST/Config.cs +++ /dev/null @@ -1,18 +0,0 @@ -//Blizzless Project 2022 -using System; -using System.Collections.Generic; -using System.Text; - -namespace DiIiS_NA.REST -{ - public sealed class Config : Core.Config.Config - { - public string IP { get { return this.GetString("IP", "127.0.0.1"); } set { this.Set("IP", value); } } - public bool Public { get { return this.GetBoolean("Public", false); } set { this.Set("Public", value); } } - public string PublicIP { get { return this.GetString("PublicIP", "0.0.0.0"); } set { this.Set("PublicIP", value); } } - public int Port { get { return this.GetInt("PORT", 8081); } set { this.Set("PORT", value); } } //8081 - private static readonly Config _instance = new Config(); - public static Config Instance { get { return _instance; } } - private Config() : base("REST") { } - } -} diff --git a/src/DiIiS-NA/REST/RestConfig.cs b/src/DiIiS-NA/REST/RestConfig.cs new file mode 100644 index 0000000..ca3bbe2 --- /dev/null +++ b/src/DiIiS-NA/REST/RestConfig.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace DiIiS_NA.REST +{ + public sealed class RestConfig : Core.Config.Config + { + public string IP + { + get => GetString("IP", "127.0.0.1"); + set => Set("IP", value); + } + + public bool Public + { + get => GetBoolean("Public", false); + set => Set("Public", value); + } + + public string PublicIP + { + get => GetString("PublicIP", "0.0.0.0"); + set => Set("PublicIP", value); + } + + public int Port + { + get => GetInt("PORT", 8081); + set => Set("PORT", value); + } //8081 + + public static RestConfig Instance { get; } = new(); + + private RestConfig() : base("REST") + { + } + } +}