Example #1
0
 public DeleteUserCommentRelationWhenDeletedPostDomainEventHandler(
     IUserCommentRelationRepository userCommentRelationRepository,
     ILogger <DeleteUserCommentRelationWhenDeletedPostDomainEventHandler> logger)
 {
     _userCommentRelationRepository = userCommentRelationRepository ?? throw new ArgumentNullException(nameof(userCommentRelationRepository));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 public CommentDeletedDomainEventHandler(
     IUserCommentRelationRepository userCommentRelationRepository,
     IPostRepository postRepository,
     IOptionsSnapshot <PostScoreRewardSettings> scoreRewardOptions,
     ILogger <CommentDeletedDomainEventHandler> logger)
 {
     _userCommentRelationRepository = userCommentRelationRepository ?? throw new ArgumentNullException(nameof(userCommentRelationRepository));
     _postRepository      = postRepository ?? throw new ArgumentNullException(nameof(postRepository));
     _scoreRewardSettings = scoreRewardOptions?.Value ?? throw new ArgumentNullException(nameof(scoreRewardOptions));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Example #3
0
 public ToggleLikeCommentCommandHandler(
     IUserCommentRelationRepository userCommentRelationRepository,
     IPostRepository postRepository,
     ICommentRepository commentRepository,
     IServiceProvider serviceProvider,
     IHttpContextAccessor httpContextAccessor,
     ILogger <ToggleLikeCommentCommandHandler> logger)
 {
     _userCommentRelationRepository = userCommentRelationRepository ?? throw new ArgumentNullException(nameof(userCommentRelationRepository));
     _postRepository      = postRepository ?? throw new ArgumentNullException(nameof(postRepository));
     _commentRepository   = commentRepository ?? throw new ArgumentNullException(nameof(commentRepository));
     _httpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor));
     _serviceProvider     = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }