Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var note = new BookingConfirmNotification() { BookingId = 2 }
- SomeWayToQueue.Add(note)
- var reminder = new ReminderNotification() { UserId = 3 }
- SomeWayToQueue.Add(reminder, TimeSpan.FromDays(1)
- public void SendAccountVerificationEmail(
- [QueueTrigger(WebJobHelper.EmailProcessorQueueName)]
- AccountVerificationEmailTask task, TextWriter log)
- {
- log.WriteLine("START: SendAccountVerificationEmail: " + task.UserId);
- const string template = "AccountVerification.cshtml";
- const string key = "account-verification";
- PrepareAndSend(user.Email, "Account confirmation", template, key, task, typeof(AccountVerificationEmailTask));
- log.WriteLine("END: SendAccountVerificationEmail: " + task.UserId);
- }
- public void SendForgottonPasswordEmail(
- [QueueTrigger(WebJobHelper.EmailProcessorQueueName)]
- ForgottonPasswordEmailTask task, TextWriter log)
- {
- const string template = "ForgottonPassword.cshtml";
- const string key = "forgotton-password";
- PrepareAndSend(user.Email, "Forgotton password", template, key, task, typeof(ForgottonPasswordEmailTask));
- }
- _bus.Send(new BookingCreatedEvent{Ref="SomeRef", Customer="SomeCustomer"});
- _bus.Send(new BookingCancelledEvent{Ref="SomeRef");
- public static void SendBookingConfirmation([ServiceBusTrigger("BookingCreated","SendConfirmation")] BookingCreatedEvent bookingDetails)
- {
- // lookup customer details from booking details
- // send email to customer
- }
- public static void UpdateBookingHistory([ServiceBusTrigger("BookingCreated","UpdateBookingHistory")] BookingCreatedEvent bookingDetails)
- {
- // save booking details to CRM
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement