77namespace NETworkManager . Settings ;
88
99/// <summary>
10- /// Manager for system-wide configuration that is loaded from a config.json file
11- /// in the application directory. This configuration overrides user settings.
10+ /// Manager for system-wide policies that are loaded from a config.json file
11+ /// in the application directory. These policies override user settings.
1212/// </summary>
13- public static class ConfigManager
13+ public static class PolicyManager
1414{
1515 #region Variables
1616
1717 /// <summary>
1818 /// Logger for logging.
1919 /// </summary>
20- private static readonly ILog Log = LogManager . GetLogger ( typeof ( ConfigManager ) ) ;
20+ private static readonly ILog Log = LogManager . GetLogger ( typeof ( PolicyManager ) ) ;
2121
2222 /// <summary>
2323 /// Config file name.
2424 /// </summary>
2525 private static string ConfigFileName => "config.json" ;
2626
2727 /// <summary>
28- /// System-wide configuration that is currently loaded.
28+ /// System-wide policies that are currently loaded.
2929 /// </summary>
30- public static ConfigInfo Current { get ; private set ; }
30+ public static PolicyInfo Current { get ; private set ; }
3131
3232 /// <summary>
3333 /// JSON serializer options for consistent serialization/deserialization.
@@ -54,7 +54,7 @@ private static string GetConfigFilePath()
5454 }
5555
5656 /// <summary>
57- /// Method to load the system-wide configuration from config.json file in the application directory.
57+ /// Method to load the system-wide policies from config.json file in the application directory.
5858 /// </summary>
5959 public static void Load ( )
6060 {
@@ -65,29 +65,29 @@ public static void Load()
6565 {
6666 try
6767 {
68- Log . Info ( $ "Loading system-wide configuration from: { filePath } ") ;
68+ Log . Info ( $ "Loading system-wide policies from: { filePath } ") ;
6969
7070 var jsonString = File . ReadAllText ( filePath ) ;
71- Current = JsonSerializer . Deserialize < ConfigInfo > ( jsonString , JsonOptions ) ;
71+ Current = JsonSerializer . Deserialize < PolicyInfo > ( jsonString , JsonOptions ) ;
7272
73- Log . Info ( "System-wide configuration loaded successfully." ) ;
73+ Log . Info ( "System-wide policies loaded successfully." ) ;
7474
7575 // Log enabled settings
7676 if ( Current . Update_DisableUpdateCheck . HasValue )
7777 {
78- Log . Info ( $ "System-wide setting - Update_DisableUpdateCheck: { Current . Update_DisableUpdateCheck . Value } ") ;
78+ Log . Info ( $ "System-wide policy - Update_DisableUpdateCheck: { Current . Update_DisableUpdateCheck . Value } ") ;
7979 }
8080 }
8181 catch ( Exception ex )
8282 {
83- Log . Error ( $ "Failed to load system-wide configuration from: { filePath } ", ex ) ;
84- Current = new ConfigInfo ( ) ;
83+ Log . Error ( $ "Failed to load system-wide policies from: { filePath } ", ex ) ;
84+ Current = new PolicyInfo ( ) ;
8585 }
8686 }
8787 else
8888 {
89- Log . Debug ( $ "No system-wide configuration file found at: { filePath } ") ;
90- Current = new ConfigInfo ( ) ;
89+ Log . Debug ( $ "No system-wide policy file found at: { filePath } ") ;
90+ Current = new PolicyInfo ( ) ;
9191 }
9292 }
9393
0 commit comments