Archived
1
0
Fork 0
forked from Moux23333/FreeSR
This repository has been archived on 2024-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
FreeSR/FreeSR.Dispatch/Service/Manager/RegionManager.cs
2024-01-27 21:08:24 +08:00

31 lines
865 B
C#

namespace FreeSR.Dispatch.Service.Manager
{
using FreeSR.Dispatch.Configuration;
using FreeSR.Proto;
internal static class RegionManager
{
private static RegionConfiguration s_configuration;
public static void Initialize(RegionConfiguration configuration)
{
s_configuration = configuration;
}
public static RegionInfo GetRegionList()
{
var region = new RegionInfo
{
EnvType = s_configuration.EnvType,
DispatchUrl = s_configuration.DispatchUrl,
Name = s_configuration.Name,
DisplayName = s_configuration.Name,
Title = s_configuration.Name
};
return region;
}
public static string GetTopServerRegionName() => s_configuration.Name;
}
}