Small changes relating to config class names.
This commit is contained in:
parent
a0ddd8f8c9
commit
61005bb1b9
@ -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") { }
|
||||
}
|
||||
}
|
||||
39
src/DiIiS-NA/REST/RestConfig.cs
Normal file
39
src/DiIiS-NA/REST/RestConfig.cs
Normal 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")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
user.block.title