public NotificationController(
     ILogger <NotificationController> logger,
     IOptions <AppSettings> settings,
     IMoongladeNotification notification)
 {
     _logger       = logger;
     Settings      = settings.Value;
     _notification = notification;
 }
Exemplo n.º 2
0
        public async Task <IActionResult> SendTestEmail([FromServices] IMoongladeNotification notification)
        {
            var response = await notification.SendTestNotificationAsync();

            if (!response.IsSuccess)
            {
                Response.StatusCode = StatusCodes.Status500InternalServerError;
            }
            return(Json(response));
        }
Exemplo n.º 3
0
 public PingbackService(
     ILogger <PingbackService> logger,
     IMoongladeNotification notification,
     IPingbackReceiver pingbackReceiver,
     IRepository <PingbackHistoryEntity> pingbackRepository,
     IRepository <PostEntity> postRepository) : base(logger)
 {
     _notification       = notification;
     _pingbackReceiver   = pingbackReceiver;
     _pingbackRepository = pingbackRepository;
     _postRepository     = postRepository;
 }
Exemplo n.º 4
0
        public CommentController(
            ILogger <CommentController> logger,
            IOptions <AppSettings> settings,
            CommentService commentService,
            IMoongladeNotification notification,
            PostService postService,
            IBlogConfig blogConfig)
            : base(logger, settings)
        {
            _blogConfig = blogConfig;

            _commentService = commentService;
            _notification   = notification;
            _postService    = postService;
        }