示例#1
0
        protected override void Execute(CodeActivityContext context)
        {
            var message = Message.Get(context);

            if (string.IsNullOrEmpty(message))
            {
                throw new ArgumentNullException("Message is empty");
            }

            Links.Set(context, LinksHelper.ExtractLinks(message));
        }
示例#2
0
        protected override void Execute(CodeActivityContext context)
        {
            var mailMessage = MailMessage.Get(context);

            if (mailMessage.IsBodyHtml)
            {
                throw new InvalidOperationException("The body mail of the message is not formatted as an HTML");
            }

            Links.Set(context, LinksHelper.ExtractLinks(mailMessage.Body));
        }