//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); }
public static TM_Server realTime_Logs(this TM_Server tmServer, bool value) { if (tmServer.notNull()) { tmServer.RealTime_Logs = value; } return(tmServer); }
//userActivites public static TM_Server userActivities_Disable_Logging(this TM_Server tmServer, bool value) { if (tmServer.notNull()) { tmServer.UserActivities_Disable_Logging = value; } return(tmServer); }
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; }
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; }
public static TM_Server.Config userData_Config(this TM_Server tmServer, string name) { return((tmServer.notNull()) ? tmServer.UserData_Configs.config(name) : null); }
public static TM_Server.Config userData_Config(this TM_Server tmServer) { return((tmServer.notNull()) ? tmServer.UserData_Configs.where (config => config.Active).first() : null); }
public static bool realTime_Logs(this TM_Server tmServer) { return((tmServer.notNull()) && tmServer.RealTime_Logs); }
public static TM_Server.Git_Config git(this TM_Server tmServer) { return(tmServer.notNull() ? tmServer.Git : null); }
//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; }