|
@@ -39,6 +39,12 @@ namespace WingServerCommon.Config
|
|
|
/// </summary>
|
|
|
/// <value></value>
|
|
|
public static RemedicalSettings? RemedicalSettings { get; private set; }
|
|
|
+ /// <summary>
|
|
|
+ /// Notification Service Settings is from configuration file
|
|
|
+ /// </summary>
|
|
|
+ /// <value></value>
|
|
|
+ public static NotificationSettings? NotificationSettings { get; private set; }
|
|
|
+
|
|
|
static ConfigurationManager()
|
|
|
{
|
|
|
var configFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "appsettings.json");
|
|
@@ -73,10 +79,10 @@ namespace WingServerCommon.Config
|
|
|
LogSettings = new LogSettings(debugMode);
|
|
|
LoadRemedicalConfig();
|
|
|
LoadStorageConfig();
|
|
|
-
|
|
|
+ LoadNotificationConfig();
|
|
|
//TODO others
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// load remedical config
|
|
|
/// </summary>
|
|
@@ -88,6 +94,16 @@ namespace WingServerCommon.Config
|
|
|
};
|
|
|
}
|
|
|
|
|
|
+ private static void LoadNotificationConfig()
|
|
|
+ {
|
|
|
+ NotificationSettings = new NotificationSettings();
|
|
|
+ var port = GetParammeter<IntParameter>("Notification", "Port")?.Value;
|
|
|
+ if (port != null)
|
|
|
+ {
|
|
|
+ NotificationSettings.Port = port.Value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 加载 存储服务 配置
|
|
|
/// </summary>
|