Esempio n. 1
0
        // Token: 0x06000393 RID: 915 RVA: 0x00016338 File Offset: 0x00014538
        private static void AddSettingToResponse(DomainResponse domainResponse, DomainStringSetting setting, string settingName)
        {
            if (setting != null)
            {
                domainResponse.DomainSettings.Add(setting);
                return;
            }
            DomainSettingError domainSettingError = new DomainSettingError();

            domainSettingError.SettingName  = settingName;
            domainSettingError.ErrorCode    = ErrorCode.SettingIsNotAvailable;
            domainSettingError.ErrorMessage = string.Format(Strings.SettingIsNotAvailable, settingName);
            domainResponse.DomainSettingErrors.Add(domainSettingError);
        }
Esempio n. 2
0
 // Token: 0x06000398 RID: 920 RVA: 0x00016784 File Offset: 0x00014984
 private bool TryParseRequestDomainSettings(out HashSet <DomainConfigurationSettingName> settingNames, out DomainSettingErrorCollection domainSettingErrors)
 {
     settingNames        = new HashSet <DomainConfigurationSettingName>();
     domainSettingErrors = new DomainSettingErrorCollection();
     foreach (string text in this.Request.RequestedSettings)
     {
         try
         {
             DomainConfigurationSettingName item = (DomainConfigurationSettingName)Enum.Parse(typeof(DomainConfigurationSettingName), text);
             settingNames.Add(item);
         }
         catch (ArgumentException)
         {
             DomainSettingError domainSettingError = new DomainSettingError();
             domainSettingError.SettingName  = text;
             domainSettingError.ErrorCode    = ErrorCode.InvalidSetting;
             domainSettingError.ErrorMessage = string.Format(Strings.InvalidUserSetting, text);
             domainSettingErrors.Add(domainSettingError);
         }
     }
     return(domainSettingErrors.Count == 0);
 }