Interface ISendGridClientWrapper
- Namespace
- Builvero.Infrastructure.Services
- Assembly
- Builvero.Infrastructure.dll
Wrapper interface for SendGrid client to enable dependency injection and testing.
public interface ISendGridClientWrapper
Remarks
This abstraction allows the SendGrid client to be mocked in unit tests and provides a consistent interface for sending emails through SendGrid's API.
Methods
SendEmailAsync(SendGridMessage, CancellationToken)
Sends an email using SendGrid's API.
Task<Response> SendEmailAsync(SendGridMessage message, CancellationToken cancellationToken = default)
Parameters
messageSendGridMessageThe SendGrid message to send, including recipient, template, and dynamic data.
cancellationTokenCancellationTokenCancellation token to cancel the operation.