You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
539 B
31 lines
539 B
1 month ago
|
using System;
|
||
|
|
||
|
namespace Sog
|
||
|
{
|
||
|
public class ServerConfigMgr : Singleton<ServerConfigMgr>
|
||
|
{
|
||
|
public object m_serverConfig;
|
||
|
|
||
|
public T ReloadServerConfig<T>(ServerApp app, string filePathName)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
object config = null;
|
||
|
config = JsonConfig.ParseAppConfigFileAndReplaceVariable<T>(app, filePathName);
|
||
|
if (config != null)
|
||
|
{
|
||
|
m_serverConfig = config;
|
||
|
}
|
||
|
return (T)m_serverConfig;
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
TraceLog.Exception(ex);
|
||
|
return (T)m_serverConfig;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|