This repository has been archived on 2024-03-29. You can view files and clone it, but cannot push or open issues or pull requests.
FreeSR/FreeSR.Dispatch/Service/Manager/RegionManager.cs

32 lines
865 B
C#
Raw Normal View History

2024-01-27 13:06:07 +00:00
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;
}
2024-01-27 13:08:24 +00:00
public static RegionInfo GetRegionList()
2024-01-27 13:06:07 +00:00
{
2024-01-27 13:08:24 +00:00
var region = new RegionInfo
2024-01-27 13:06:07 +00:00
{
EnvType = s_configuration.EnvType,
DispatchUrl = s_configuration.DispatchUrl,
Name = s_configuration.Name,
DisplayName = s_configuration.Name,
Title = s_configuration.Name
};
2024-01-27 13:08:24 +00:00
return region;
2024-01-27 13:06:07 +00:00
}
public static string GetTopServerRegionName() => s_configuration.Name;
}
}