/// <summary> /// Populate event configuration /// </summary> public void PopulateEventConfiguration() { var configpath = Path.Combine(DirectoryManagement.sUserDataFolderPath, EventConfigFileName); try { var rcfg = RecorderSetting.LoadConfiguration(configpath); this.EventConfig = rcfg; } catch (Exception) { RecorderSetting.RemoveConfiguration(configpath); this.EventConfig = RecorderSetting.LoadConfiguration(configpath); } }
/// <summary> /// Populate event configuration /// </summary> public void PopulateEventConfiguration() { MigrateEventConfigurationFile(); var configpath = Path.Combine(SettingsProvider.ConfigurationFolderPath, EventConfigFileName); try { var rcfg = RecorderSetting.LoadConfiguration(configpath); this.EventConfig = rcfg; } #pragma warning disable CA1031 // Do not catch general exception types catch (Exception e) { e.ReportException(); RecorderSetting.RemoveConfiguration(configpath); this.EventConfig = RecorderSetting.LoadConfiguration(configpath); } #pragma warning restore CA1031 // Do not catch general exception types }