Small changes relating to config class names.

This commit is contained in:
Lucca Faria Ferri 2023-02-06 10:36:40 -08:00
parent a0ddd8f8c9
commit 61005bb1b9
2 changed files with 39 additions and 18 deletions

View File

@ -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") { }
}
}

View File

@ -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")
{
}
}
}