Пример #1
0
 private static bool IsTransportRuleEnabledAndHasRightsProtectMessageAction(Microsoft.Exchange.MessagingPolicies.Rules.Rule transportRule, object delegateContext)
 {
     if (transportRule.Enabled != RuleState.Enabled)
     {
         return(false);
     }
     return(transportRule.Actions.Any((Microsoft.Exchange.MessagingPolicies.Rules.Action action) => action is RightsProtectMessage));
 }
Пример #2
0
        private void ReadAction(Microsoft.Exchange.MessagingPolicies.Rules.Rule rule)
        {
            if (rule.Actions.Count != 1)
            {
                throw new JournalRuleCorruptException();
            }
            string name;

            if ((name = rule.Actions[0].Name) != null && name == "Journal")
            {
                this.ReadJournalAction(rule.Actions[0]);
                return;
            }
            throw new JournalRuleCorruptException();
        }
Пример #3
0
 private static bool IsTransportRuleEnabledAndHasEncryptMessageOrDecryptMessageAction(Microsoft.Exchange.MessagingPolicies.Rules.Rule transportRule, object delegateContext)
 {
     if (transportRule.Enabled != RuleState.Enabled)
     {
         return(false);
     }
     if (!transportRule.Actions.Any((Microsoft.Exchange.MessagingPolicies.Rules.Action action) => action is ApplyOME))
     {
         return(transportRule.Actions.Any((Microsoft.Exchange.MessagingPolicies.Rules.Action action) => action is RemoveOME));
     }
     return(true);
 }