Exemplo n.º 1
0
        /// <summary>
        /// Extension method for adding the SendGrid integration to the the WardenConfiguration.
        /// </summary>
        /// <param name="builder">Instance of the Warden configuration builder.</param>
        /// <param name="configuration">Configuration of SendGridIntegration.</param>
        /// <returns>Instance of fluent builder for the WardenConfiguration.</returns>
        public static WardenConfiguration.Builder IntegrateWithSendGrid(
            this WardenConfiguration.Builder builder,
            SendGridIntegrationConfiguration configuration)
        {
            builder.AddIntegration(SendGridIntegration.Create(configuration));

            return builder;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Extension method for adding the SendGrid integration to the the WardenConfiguration.
        /// </summary>
        /// <param name="builder">Instance of the Warden configuration builder.</param>
        /// <param name="apiKey">API key of the SendGrid account.</param>
        /// <param name="sender">Email address of the message sender.</param>
        /// <param name="configurator">Optional lambda expression for configuring the SendGridIntegration.</param>
        /// <returns>Instance of fluent builder for the WardenConfiguration.</returns>
        public static WardenConfiguration.Builder IntegrateWithSendGrid(
            this WardenConfiguration.Builder builder,
            string apiKey, string sender,
            Action<SendGridIntegrationConfiguration.Builder> configurator = null)
        {
            builder.AddIntegration(SendGridIntegration.Create(apiKey, sender, configurator));

            return builder;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Extension method for adding the SendGrid integration to the the WardenConfiguration.
        /// </summary>
        /// <param name="builder">Instance of the Warden configuration builder.</param>
        /// <param name="username">Username of the SendGrid account.</param>
        /// <param name="password">Password of the SendGrid account.</param>
        /// <param name="sender">Email address of the message sender.</param>
        /// <param name="configurator">Optional lambda expression for configuring the SendGridIntegration.</param>
        /// <returns>Instance of fluent builder for the WardenConfiguration.</returns>
        public static WardenConfiguration.Builder IntegrateWithSendGrid(
            this WardenConfiguration.Builder builder,
            string username, string password, string sender,
            Action<SendGridIntegrationConfiguration.Builder> configurator = null)
        {
            builder.AddIntegration(SendGridIntegration.Create(username, password, sender, configurator));

            return builder;
        }