コード例 #1
0
 protected override void InternalValidate()
 {
     TaskLogger.LogEnter();
     base.InternalValidate();
     ((IConfigurationSession)base.DataSession).SessionSettings.IsSharedConfigChecked = true;
     if (!this.IgnoreDehydratedFlag)
     {
         SharedConfigurationTaskHelper.VerifyIsNotTinyTenant(base.CurrentOrgState, new Task.ErrorLoggerDelegate(base.WriteError));
     }
     if (this.DataObject.LanguageBlockList != null)
     {
         foreach (string text in this.DataObject.LanguageBlockList)
         {
             if (!HygieneUtils.IsAntispamFilterableLanguage(text))
             {
                 base.WriteError(new ArgumentException(Strings.ErrorUnsupportedBlockLanguage(text)), ErrorCategory.InvalidArgument, text);
             }
         }
     }
     if (this.DataObject.RegionBlockList != null)
     {
         foreach (string text2 in this.DataObject.RegionBlockList)
         {
             if (!HygieneUtils.IsValidIso3166Alpha2Code(text2))
             {
                 base.WriteError(new ArgumentException(Strings.ErrorInvalidIso3166Alpha2Code(text2)), ErrorCategory.InvalidArgument, text2);
             }
         }
     }
     if (this.DataObject.IsModified(HostedContentFilterPolicySchema.EnableEndUserSpamNotifications) && this.DataObject.EnableEndUserSpamNotifications)
     {
         HostedContentFilterRule policyScopingRule = this.GetPolicyScopingRule();
         if (policyScopingRule != null && !policyScopingRule.IsEsnCompatible)
         {
             base.WriteError(new OperationNotAllowedException(Strings.ErrorEsnIncompatibleRule(policyScopingRule.Name)), ErrorCategory.InvalidOperation, null);
         }
     }
     TaskLogger.LogExit();
 }
コード例 #2
0
 protected override void InternalValidate()
 {
     TaskLogger.LogEnter();
     base.InternalValidate();
     if (this.DataObject.LanguageBlockList != null)
     {
         foreach (string text in from x in this.DataObject.LanguageBlockList
                  where !HygieneUtils.IsAntispamFilterableLanguage(x)
                  select x)
         {
             base.WriteError(new ArgumentException(Strings.ErrorUnsupportedBlockLanguage(text)), ErrorCategory.InvalidArgument, text);
         }
     }
     if (this.DataObject.RegionBlockList != null)
     {
         foreach (string text2 in from x in this.DataObject.RegionBlockList
                  where !HygieneUtils.IsValidIso3166Alpha2Code(x)
                  select x)
         {
             base.WriteError(new ArgumentException(Strings.ErrorInvalidIso3166Alpha2Code(text2)), ErrorCategory.InvalidArgument, text2);
         }
     }
     TaskLogger.LogExit();
 }