示例#1
0
 //site data
 public static TM_Server             add_SiteData(this TM_Server tmServer, TM_Server.Config config)
 {
     if (tmServer.notNull() && config.notNull())
     {
         tmServer.SiteData_Configs.add_Config(config);
     }
     return(tmServer);
 }
示例#2
0
 public static TM_Server                  realTime_Logs(this TM_Server tmServer, bool value)
 {
     if (tmServer.notNull())
     {
         tmServer.RealTime_Logs = value;
     }
     return(tmServer);
 }
示例#3
0
 //userActivites
 public static TM_Server                  userActivities_Disable_Logging(this TM_Server tmServer, bool value)
 {
     if (tmServer.notNull())
     {
         tmServer.UserActivities_Disable_Logging = value;
     }
     return(tmServer);
 }
示例#4
0
 public static List<TM_Server.Config> active_Config(this List<TM_Server.Config> configs, TM_Server.Config config)
 {
     if (configs.notNull() && config.notNull())
     {
         configs.ForEach(_config => _config.Active = false);
         config.Active = true;
     }
     return configs;
 }
示例#5
0
 public static List<TM_Server.Config> add_Config(this List<TM_Server.Config> configs, TM_Server.Config config)
 {
     if (configs.notNull() && config.notNull())
     {
         var existingConfig = configs.config(config.Name);
         if (existingConfig.notNull())                                    // if it already exists, remove it (before adding)
             configs.remove(existingConfig);
         configs.add(config);
     }
     return configs;
 }
示例#6
0
 public static TM_Server.Config      userData_Config(this TM_Server tmServer, string name)
 {
     return((tmServer.notNull())
                 ? tmServer.UserData_Configs.config(name)
                 : null);
 }
示例#7
0
 public static TM_Server.Config      userData_Config(this TM_Server tmServer)
 {
     return((tmServer.notNull())
                 ? tmServer.UserData_Configs.where (config => config.Active).first()
                 : null);
 }
示例#8
0
 public static bool                        realTime_Logs(this TM_Server tmServer)
 {
     return((tmServer.notNull()) && tmServer.RealTime_Logs);
 }
示例#9
0
 public static TM_Server.Git_Config   git(this TM_Server tmServer)
 {
     return(tmServer.notNull() ? tmServer.Git : null);
 }
示例#10
0
 //user data
 public static TM_Server add_UserData(this TM_Server tmServer, TM_Server.Config config)
 {
     if (tmServer.notNull() && config.notNull())
         tmServer.UserData_Configs.add_Config(config);
     return tmServer;
 }