C# Class Telerik.Sitefinity.Newsletters.SendGrid.Notifications.SendGridSender

SendGrid email sender.
Inheritance: Sender, IBatchSender
Show file Open project: Sitefinity/NewslettersSendGrid Class Usage Examples

Public Methods

Method Description
ConstructMessage ( IMessageJobRequest messageJob, IEnumerable subscribers ) : SendGrid.SendGridMessage

Constructs a SendGrid message based on the specified messageJob and subscribers.

SendAsync ( SendGrid message ) : Task

Sends the specified SendGrid message.

SendGridSender ( ) : System

Initializes a new instance of the SendGridSender class.

This constructor method is used by the unit tests project.

SendGridSender ( SenderProfileElement senderProfile ) : System

Initializes a new instance of the SendGridSender class.

This is the constructor that is used by the Sitefinity notifications send scheduled task to construct an initialized instance of this sender.

SendMessage ( IMessageInfo messageInfo, ISubscriberRequest subscriber ) : SendResult

Sends an instant message to the specified subscriber.

SendMessage ( IMessageJobRequest messageJob, IEnumerable subscribers ) : SendResult

Sends the message to the given subscribers using the SendGrid service.

Private Methods

Method Description
AddCustomHeaders ( SendGrid message, string>.IDictionary customMessageHeaders ) : void
AddGlobalProperties ( SendGrid message, IMessageJobRequest messageJob ) : void
AddSubscribersInfo ( SendGrid message, IMessageJobRequest messageJob, IEnumerable subscribers ) : void
CalculateSubstitutions ( Dictionary substitutions, string>.Dictionary subscriberProperties ) : void
Dispose ( ) : void
GetReplacementTags ( IMessageJobRequest messageJob ) : IEnumerable
InitSettings ( SenderProfileElement senderProfile ) : void
InitializeSubstitutions ( IEnumerable replacementTags, string>.IDictionary customHeaders ) : List>.Dictionary

Method Details

ConstructMessage() public method

Constructs a SendGrid message based on the specified messageJob and subscribers.
public ConstructMessage ( IMessageJobRequest messageJob, IEnumerable subscribers ) : SendGrid.SendGridMessage
messageJob IMessageJobRequest The Sitefinity message job from which to construct a SendGrid message.
subscribers IEnumerable The subscribers for the message.
return SendGrid.SendGridMessage

SendAsync() public method

Sends the specified SendGrid message.
public SendAsync ( SendGrid message ) : Task
message SendGrid The SendGrid message to send.
return Task

SendGridSender() public method

Initializes a new instance of the SendGridSender class.
This constructor method is used by the unit tests project.
public SendGridSender ( ) : System
return System

SendGridSender() public method

Initializes a new instance of the SendGridSender class.
This is the constructor that is used by the Sitefinity notifications send scheduled task to construct an initialized instance of this sender.
public SendGridSender ( SenderProfileElement senderProfile ) : System
senderProfile SenderProfileElement The sender profile.
return System

SendMessage() public method

Sends an instant message to the specified subscriber.
public SendMessage ( IMessageInfo messageInfo, ISubscriberRequest subscriber ) : SendResult
messageInfo IMessageInfo The message info.
subscriber ISubscriberRequest The subscriber.
return SendResult

SendMessage() public method

Sends the message to the given subscribers using the SendGrid service.
public SendMessage ( IMessageJobRequest messageJob, IEnumerable subscribers ) : SendResult
messageJob IMessageJobRequest The message info.
subscribers IEnumerable The subscribers.
return SendResult