// Token: 0x060014D0 RID: 5328 RVA: 0x00049EBC File Offset: 0x000480BC
 protected override object GetConditionValue(BaseTransportRulesEvaluationContext context)
 {
     if (!this.areAdressesExpanded)
     {
         OwaRulesEvaluationContext owaRulesEvaluationContext = context as OwaRulesEvaluationContext;
         this.SetValue(ADUtils.GetAllEmailAddresses(base.Value.RawValues, owaRulesEvaluationContext.OrganizationId));
         this.areAdressesExpanded = true;
     }
     return(base.Value.GetValue(context));
 }
Beispiel #2
0
        protected override ExecutionControl OnExecute(RulesEvaluationContext baseContext)
        {
            BaseTransportRulesEvaluationContext baseTransportRulesEvaluationContext = (BaseTransportRulesEvaluationContext)baseContext;

            if (baseTransportRulesEvaluationContext.CurrentRule != null && baseTransportRulesEvaluationContext.CurrentRule.Mode == RuleMode.AuditAndNotify)
            {
                baseTransportRulesEvaluationContext.ActionName = DlpPolicyTipAction.NotifyOnly.ToString();
            }
            else
            {
                baseTransportRulesEvaluationContext.ActionName = (string)base.Arguments[0].GetValue(baseTransportRulesEvaluationContext);
            }
            return(ExecutionControl.Execute);
        }
Beispiel #3
0
        // Token: 0x060014CD RID: 5325 RVA: 0x00049D1C File Offset: 0x00047F1C
        public override bool Evaluate(RulesEvaluationContext baseContext)
        {
            BaseTransportRulesEvaluationContext baseTransportRulesEvaluationContext = (BaseTransportRulesEvaluationContext)baseContext;

            if (baseTransportRulesEvaluationContext == null)
            {
                throw new ArgumentException("context is either null or not of type: BaseTransportRulesEvaluationContext");
            }
            baseTransportRulesEvaluationContext.PredicateName = this.Name;
            ShortList <string> shortList = (ShortList <string>)base.Property.GetValue(baseTransportRulesEvaluationContext);
            List <string>      matches   = new List <string>();
            bool flag = false;

            if (shortList != null && shortList.Count > 0)
            {
                List <RoutingAddress> list = new List <RoutingAddress>(shortList.Count);
                foreach (string address in shortList)
                {
                    if (RoutingAddress.IsValidAddress(address))
                    {
                        list.Add((RoutingAddress)address);
                    }
                }
                switch (this.Type)
                {
                case ScopeType.Internal:
                    flag = ADUtils.IsAnyInternal(list, ((OwaRulesEvaluationContext)baseTransportRulesEvaluationContext).OrganizationId, base.EvaluationMode, ref matches);
                    break;

                case ScopeType.External:
                    flag = ADUtils.IsAnyExternal(list, ((OwaRulesEvaluationContext)baseTransportRulesEvaluationContext).OrganizationId, base.EvaluationMode, ref matches);
                    break;

                case ScopeType.ExternalPartner:
                    flag = ADUtils.IsAnyExternalPartner(list, ((OwaRulesEvaluationContext)baseTransportRulesEvaluationContext).OrganizationId, base.EvaluationMode, ref matches);
                    break;

                case ScopeType.ExternalNonPartner:
                    flag = ADUtils.IsAnyExternalNonPartner(list, ((OwaRulesEvaluationContext)baseTransportRulesEvaluationContext).OrganizationId, base.EvaluationMode, ref matches);
                    break;

                default:
                    throw new ArgumentException(string.Format("this.Type:{0} is not a valid ScopeType.", this.Type));
                }
            }
            base.UpdateEvaluationHistory(baseContext, flag, matches, 0);
            return(flag);
        }