forked from PGR/ascnet
1
0
Fork 0
ascnet/AscNet.Common/Config.cs

54 lines
1.1 KiB
C#
Raw Normal View History

2023-10-06 13:29:27 +00:00
using Config.Net;
namespace AscNet.Common
{
public interface IConfig
{
[Option(DefaultValue = VerboseLevel.Normal)]
VerboseLevel VerboseLevel { get; set; }
[Option]
IGameServer GameServer { get; set; }
[Option]
IDatabase Database { get; set; }
[Option(DefaultValue = false)]
bool SaveClientLogs { get; set; }
interface IGameServer
{
2023-10-07 00:44:06 +00:00
[Option(DefaultValue = nameof(AscNet))]
string RegionName { get; set; }
2023-10-06 13:29:27 +00:00
[Option(DefaultValue = "127.0.0.1")]
string Host { get; set; }
[Option(DefaultValue = (ushort)2335)]
ushort Port { get; set; }
}
interface IDatabase
{
[Option(DefaultValue = "127.0.0.1")]
string Host { get; set; }
[Option(DefaultValue = (ushort)27017)]
ushort Port { get; set; }
2023-10-08 02:27:30 +00:00
[Option(DefaultValue = "asc_net")]
2023-10-06 13:29:27 +00:00
string Name { get; set; }
}
}
public enum VerboseLevel
{
Silent = 0,
Normal = 1,
Debug = 2,
SuperDebug = 3
}
}