예제 #1
0
        public async Task <IActionResult> SendTestEmail([FromServices] IMoongladeNotificationClient notificationClient)
        {
            var response = await notificationClient.SendTestNotificationAsync();

            if (!response.IsSuccess)
            {
                Response.StatusCode = StatusCodes.Status500InternalServerError;
            }
            return(Json(response));
        }
예제 #2
0
 public PingbackService(
     ILogger <PingbackService> logger,
     IPingbackReceiver pingbackReceiver,
     IRepository <PingbackHistoryEntity> pingbackRepository,
     IRepository <PostEntity> postRepository,
     IMoongladeNotificationClient notificationClient = null) : base(logger)
 {
     _notificationClient = notificationClient;
     _pingbackReceiver   = pingbackReceiver;
     _pingbackRepository = pingbackRepository;
     _postRepository     = postRepository;
 }
예제 #3
0
        public CommentController(
            ILogger <CommentController> logger,
            IOptions <AppSettings> settings,
            CommentService commentService,
            IBlogConfig blogConfig,
            IMoongladeNotificationClient notificationClient = null)
            : base(logger, settings)
        {
            _blogConfig = blogConfig;

            _commentService     = commentService;
            _notificationClient = notificationClient;
        }