/// <summary>
        /// ctor the Mighty
        /// </summary>
        public BrewSessionCommentEmailMessage(IWebSettings webSettings, BrewSession brewSession, string commenterUsername,
                                              UserSummary userToNotify, BrewSessionComment brewSessionComment, BrewgrUrlBuilder brewgrUrlBuilder)
            : base(webSettings)
        {
            this.WebSettings        = webSettings;
            this.BrewSession        = brewSession;
            this.CommenterUsername  = commenterUsername;
            this.UserToNotify       = userToNotify;
            this.BrewSessionComment = brewSessionComment;
            this.BrewgrUrlBuilder   = brewgrUrlBuilder;

            // Set Sender
            this.SenderAddress     = webSettings.SenderAddress;
            this.SenderDisplayName = webSettings.SenderDisplayName;

            // Set Recipient
            this.ToRecipients.Add(userToNotify.EmailAddress);

            // Build Subject
            if (brewSession.UserId == userToNotify.UserId)
            {
                this.Subject = string.Format("{0} commented on your brew session for {1}", commenterUsername, brewSession.RecipeSummary.RecipeName);
            }
            else
            {
                this.Subject = string.Format("{0} also left a comment on the brew session for {1}", commenterUsername, brewSession.RecipeSummary.RecipeName);
            }
        }
        /// <summary>
        /// ctor the Mighty
        /// </summary>
        public BrewSessionCommentEmailMessage(IWebSettings webSettings, BrewSession brewSession, string commenterUsername,
            UserSummary userToNotify, BrewSessionComment brewSessionComment, BrewgrUrlBuilder brewgrUrlBuilder)
            : base(webSettings)
        {
            this.WebSettings = webSettings;
            this.BrewSession = brewSession;
            this.CommenterUsername = commenterUsername;
            this.UserToNotify = userToNotify;
            this.BrewSessionComment = brewSessionComment;
            this.BrewgrUrlBuilder = brewgrUrlBuilder;

            // Set Sender
            this.SenderAddress = webSettings.SenderAddress;
            this.SenderDisplayName = webSettings.SenderDisplayName;

            // Set Recipient
            this.ToRecipients.Add(userToNotify.EmailAddress);

            // Build Subject
            if (brewSession.UserId == userToNotify.UserId)
            {
                this.Subject = string.Format("{0} commented on your brew session for {1}", commenterUsername, brewSession.RecipeSummary.RecipeName);
            }
            else
            {
                this.Subject = string.Format("{0} also left a comment on the brew session for {1}", commenterUsername, brewSession.RecipeSummary.RecipeName);
            }
        }
		/// <summary>
		/// ctor the Mighty
		/// </summary>
		public RecipeCommentEmailMessage(IWebSettings webSettings, RecipeSummary recipeSummary, string commenterUsername, 
			UserSummary userToNotify, RecipeComment recipeComment, BrewgrUrlBuilder brewgrUrlBuilder) : base(webSettings)
		{
			this.WebSettings = webSettings;
			this.RecipeSummary = recipeSummary;
			this.CommenterUsername = commenterUsername;
			this.UserToNotify = userToNotify;
			this.RecipeComment = recipeComment;
			this.BrewgrUrlBuilder = brewgrUrlBuilder;

			// Set Sender
			this.SenderAddress = webSettings.SenderAddress;
			this.SenderDisplayName = webSettings.SenderDisplayName;

			// Set Recipient
			this.ToRecipients.Add(userToNotify.EmailAddress);

			// Build Subject
			if (recipeSummary.CreatedBy == userToNotify.UserId)
			{
				this.Subject = string.Format("{0} commented on your recipe, {1}", commenterUsername, recipeSummary.RecipeName);
			}
			else
			{
				this.Subject = string.Format("{0} also left a comment on the recipe, {1}", commenterUsername, recipeSummary.RecipeName);
			}
		}
Ejemplo n.º 4
0
        /// <summary>
        /// ctor the Mighty
        /// </summary>
        public RecipeCommentEmailMessage(IWebSettings webSettings, RecipeSummary recipeSummary, string commenterUsername,
                                         UserSummary userToNotify, RecipeComment recipeComment, BrewgrUrlBuilder brewgrUrlBuilder) : base(webSettings)
        {
            this.WebSettings       = webSettings;
            this.RecipeSummary     = recipeSummary;
            this.CommenterUsername = commenterUsername;
            this.UserToNotify      = userToNotify;
            this.RecipeComment     = recipeComment;
            this.BrewgrUrlBuilder  = brewgrUrlBuilder;

            // Set Sender
            this.SenderAddress     = webSettings.SenderAddress;
            this.SenderDisplayName = webSettings.SenderDisplayName;

            // Set Recipient
            this.ToRecipients.Add(userToNotify.EmailAddress);

            // Build Subject
            if (recipeSummary.CreatedBy == userToNotify.UserId)
            {
                this.Subject = string.Format("{0} commented on your recipe, {1}", commenterUsername, recipeSummary.RecipeName);
            }
            else
            {
                this.Subject = string.Format("{0} also left a comment on the recipe, {1}", commenterUsername, recipeSummary.RecipeName);
            }
        }
		/// <summary>
		/// ctor the Mighty
		/// </summary>
		public BrewerFollowNotification(IWebSettings webSettings, IUserService userService, 
			IEmailSender emailSender, INotificationService notificationService, BrewgrUrlBuilder brewgrUrlBuilder)
		{
			this.WebSettings = webSettings;
			this.UserService = userService;
			this.EmailSender = emailSender;
			this.NotificationService = notificationService;
			this.BrewgrUrlBuilder = brewgrUrlBuilder;
		}
Ejemplo n.º 6
0
 /// <summary>
 /// ctor the Mighty
 /// </summary>
 public BrewerFollowNotification(IWebSettings webSettings, IUserService userService,
                                 IEmailSender emailSender, INotificationService notificationService, BrewgrUrlBuilder brewgrUrlBuilder)
 {
     this.WebSettings         = webSettings;
     this.UserService         = userService;
     this.EmailSender         = emailSender;
     this.NotificationService = notificationService;
     this.BrewgrUrlBuilder    = brewgrUrlBuilder;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// ctor the Mighty
 /// </summary>
 public RecipeCommentNotification(INotificationService notificationService, IRecipeService recipeService, IUserService userService, IEmailSender emailSender,
                                  IWebSettings webSettings, BrewgrUrlBuilder recipeUrlBuilder)
 {
     this.NotificationService = notificationService;
     this.RecipeService       = recipeService;
     this.UserService         = userService;
     this.EmailSender         = emailSender;
     this.WebSettings         = webSettings;
     this.RecipeUrlBuilder    = recipeUrlBuilder;
 }
		/// <summary>
		/// ctor the Mighty
		/// </summary>
        public BrewSessionCommentNotification(INotificationService notificationService, IRecipeService recipeService, IUserService userService, IEmailSender emailSender, 
			IWebSettings webSettings, BrewgrUrlBuilder recipeUrlBuilder)
		{
			this.NotificationService = notificationService;
			this.RecipeService = recipeService;
			this.UserService = userService;
			this.EmailSender = emailSender;
			this.WebSettings = webSettings;
			this.RecipeUrlBuilder = recipeUrlBuilder;
		}
		/// <summary>
		/// ctor the Mighty
		/// </summary>
		public BrewerFollowEmailMessage(IWebSettings webSettings, string followingUsername, UserSummary userToNotify, BrewgrUrlBuilder brewgrUrlBuilder) : base(webSettings)
		{
			this.WebSettings = webSettings;
			this.FollowingUsername = followingUsername;
			this.UserToNotify = userToNotify;
			this.BrewgrUrlBuilder = brewgrUrlBuilder;

			// Set Sender
			this.SenderAddress = webSettings.SenderAddress;
			this.SenderDisplayName = webSettings.SenderDisplayName;

			// Set Recipient
			this.ToRecipients.Add(userToNotify.EmailAddress);

			// Build Subject
			this.Subject = followingUsername + " is now following you!";
		}
Ejemplo n.º 10
0
        /// <summary>
        /// ctor the Mighty
        /// </summary>
        public BrewerFollowEmailMessage(IWebSettings webSettings, string followingUsername, UserSummary userToNotify, BrewgrUrlBuilder brewgrUrlBuilder) : base(webSettings)
        {
            this.WebSettings       = webSettings;
            this.FollowingUsername = followingUsername;
            this.UserToNotify      = userToNotify;
            this.BrewgrUrlBuilder  = brewgrUrlBuilder;

            // Set Sender
            this.SenderAddress     = webSettings.SenderAddress;
            this.SenderDisplayName = webSettings.SenderDisplayName;

            // Set Recipient
            this.ToRecipients.Add(userToNotify.EmailAddress);

            // Build Subject
            this.Subject = followingUsername + " is now following you!";
        }