示例#1
0
        /// <summary>
        /// Creates the notification email for the specified event and user.
        /// </summary>
        /// <param name="event">The event.</param>
        /// <param name="user">The user.</param>
        /// <returns>The email subject and body.</returns>
        public (string, string) CreateNotificationEmail(Event @event, User user)
        {
            if (@event.Id != EventId)
            {
                throw new InvalidOperationException("The specified event is not valid for this notification.");
            }

            if (user.Id != UserId)
            {
                throw new InvalidOperationException("The specified user is not valid for this notification.");
            }

            return(NotificationType.CreateNotificationEmail(@event, user));
        }