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)); }
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)); }