Example #1
0
 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);
 }
Example #2
0
        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;
        }