How I can create Contactor in code effect for ExternalAction , I have this code
[ExternalAction(typeof(Service), "SendEmail")]
And I want send email when success Evaluate but without write send code in SendEmail, I want use call interface to send it , like this
private readonly IEmailService email;
public Service(IEmailService emailService)
{
email = emailService;
}
[Action("Send Email", "Send Email to Someone")]
public void SendEmail(Rule Rule, [Parameter(ValueInputType.User, Description = "Output message", DataSourceName = "UserList")] int userId)
{
email.sene(userId);
}