/// <summary> /// Instantiate the <see cref="SendGridProvider"/> /// </summary> /// <param name="sendGridOptions">The options for this provider</param> /// <param name="loggerFactory">The logger factory</param> public SendGridProvider(IOptions <SendGridOptions> sendGridOptions, ILoggerFactory loggerFactory) : base(sendGridOptions.Value, loggerFactory) { _sendGridClient = new SendGridClient(sendGridOptions.Value.Apikey); _sendGridOptions = sendGridOptions.Value; }
/// <summary> /// Instantiate the <see cref="SendGridProvider"/> /// <para>Please be aware in using this constructor because it was originally intended for testing and it could cause /// unwanted behavior if it is used in the real application</para> /// </summary> /// <param name="sendGridClient">The <see cref="ISendGridClient"/> object</param> /// <param name="sendGridOptions">The options for this provider</param> /// <param name="loggerFactory">The logger factory</param> public SendGridProvider(SendGridOptions sendGridOptions, ISendGridClient sendGridClient, ILoggerFactory loggerFactory) : base(sendGridOptions, loggerFactory) { _sendGridClient = sendGridClient; _sendGridOptions = sendGridOptions; }
/// <summary> /// Instantiate the <see cref="SendGridProvider"/> /// </summary> /// <param name="sendGridOptions">The options for this provider</param> /// <param name="loggerFactory">The logger factory</param> public SendGridProvider(SendGridOptions sendGridOptions, ILoggerFactory loggerFactory) : base(sendGridOptions, loggerFactory) { _sendGridClient = new SendGridClient(sendGridOptions.Apikey); _sendGridOptions = sendGridOptions; }