public ActionResult <ConfigureResponse> GetConfiguration() { m_Logger.Info($"[GET] {APIRoutes.ConfigurationRoute}"); var result = new ConfigureResponse(); string cachedManagementInformation; if (m_MemoryCache.TryGetValue <string>(CacheKeys.ManagementInformationKey, out cachedManagementInformation)) { result.ManagementInformationPath = cachedManagementInformation; } else { result.ManagementInformationPath = m_Manager.ManagementInformationPath; } return(result); }
public ConfigureResponse Configure(ConfigureRequest request) { ToastHelper.PopToast("Configure"); if (request.FirewallEnabled) { FirewallHelper.EnableFirewall(); } else { FirewallHelper.DisableFirewall(); } var response = new ConfigureResponse(); response.FirewallEnabled = FirewallHelper.IsEnabled(); return(response); }