public IHttpActionResult GetDisplaySettings() { try { var displaySettings = SettingsInit.GetDisplaySettings(context.Server.MapPath(DISPLAY_SETTINGS_PATH)); if (displaySettings == null) { return(NotFound()); } return(Ok(displaySettings)); } catch (Exception ex) { return(BadRequest(string.Concat(ex.ToString(), " ____ ", ex.StackTrace))); } }
private void ApplySettings_() { //in case there is no mod configuration to load we initialize the settings here, so that the mod menu can be used without errors. SettingsInit.init(); if (settings == null) { return; } SettingsStorage.ApplySettings(); foreach (Action <Mod> listener in applySettingsListeners) { listener(this); } }
public override void ExposeData() { base.ExposeData(); SettingsInit.init(); SettingsStorage.ExposeData(); }