예제 #1
0
 public CommentController(ILogger <CommentController> logger, ICommentsDataProvider commentsDataProvider,
                          ICommentService commentService, IHtmlSanitizer htmlSanitizer, ICommentCommand commentCommand,
                          IEtagService etagService, ILikeService likeService)
 {
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
     _commentsDataProvider = commentsDataProvider ?? throw new ArgumentNullException(nameof(commentsDataProvider));
     _commentService       = commentService ?? throw new ArgumentNullException(nameof(commentService));
     _htmlSanitizer        = htmlSanitizer ?? throw new ArgumentNullException(nameof(htmlSanitizer));
     _commentCommand       = commentCommand ?? throw new ArgumentNullException(nameof(commentCommand));
     _etagService          = etagService ?? throw new ArgumentNullException(nameof(etagService));
     _likeService          = likeService ?? throw new ArgumentNullException(nameof(likeService));;
 }
예제 #2
0
 public CommentService(ISystemClock systemClock,
                       ILogger <CommentService> logger,
                       IPermissionsService permissionsService,
                       ICommentCommand commentCommand,
                       ICommentNotificationService commentNotificationService)
 {
     _systemClock                = systemClock ?? throw new ArgumentNullException(nameof(systemClock));
     _commentCommand             = commentCommand ?? throw new ArgumentNullException(nameof(commentCommand));
     _permissionsService         = permissionsService ?? throw new ArgumentNullException(nameof(permissionsService));
     _logger                     = logger ?? throw new ArgumentNullException(nameof(logger));
     _commentNotificationService = commentNotificationService ?? throw new ArgumentNullException(nameof(commentNotificationService));
 }
예제 #3
0
 public BlogController(IArticleQuery articleQuery, IArticleCommand articleCommand, ICommentCommand commentCommand)
 {
     ArticleQuery   = articleQuery;
     ArticleCommand = articleCommand;
     CommentCommand = commentCommand;
 }