public SettingsManagementVM(InsideWordSettingsDictionary iwSettings, List<ProviderCategory> categoryList, InsideWordWebLog webLog) { long? defaultCategory = iwSettings.DefaultCategoryId; if (defaultCategory.HasValue) { DefaultCategoryId = defaultCategory.Value; } else { DefaultCategoryId = -1; } Refresh(categoryList, webLog); }
public static bool Initialize(InsideWordSettingsDictionary settingsDict) { string logThreshold = settingsDict.LogThresholdName; if(!string.IsNullOrWhiteSpace(logThreshold)) { Instance.IWThreshold = InsideWordWebLog.Instance.Log.Logger.Repository.LevelMap[logThreshold]; } string emailLogThreshold = settingsDict.LogEmailThresholdName; if (!string.IsNullOrWhiteSpace(emailLogThreshold)) { Instance.IWSmtpThreshold = InsideWordWebLog.Instance.Log.Logger.Repository.LevelMap[emailLogThreshold]; } return true; }