Exemple #1
0
        protected override object OnGetValue(RulesEvaluationContext baseContext)
        {
            OwaRulesEvaluationContext owaRulesEvaluationContext = (OwaRulesEvaluationContext)baseContext;
            object result = null;
            string name;

            if ((name = base.Name) != null)
            {
                if (!(name == "Message.From"))
                {
                    if (!(name == "Message.To"))
                    {
                        if (name == "Message.DataClassifications")
                        {
                            result = owaRulesEvaluationContext.DataClassifications;
                        }
                    }
                    else
                    {
                        ShortList <string> recipients = owaRulesEvaluationContext.Recipients;
                        if (recipients != null && recipients.Any <string>())
                        {
                            result = recipients;
                        }
                    }
                }
                else
                {
                    result = new ShortList <string>
                    {
                        owaRulesEvaluationContext.FromAddress
                    };
                }
            }
            return(result);
        }