Example #1
0
 public HidePostCommandHandler(
     IPublisher bus,
     IPostReadOnlyRepository postReadOnlyRepository)
 {
     this.bus = bus ??
                throw new ArgumentNullException(nameof(bus));
     this.postReadOnlyRepository = postReadOnlyRepository ??
                                   throw new ArgumentNullException(nameof(postReadOnlyRepository));
 }
 public PostDisabledEventHandler(
     IPostReadOnlyRepository postReadOnlyRepository,
     IPostWriteOnlyRepository postWriteOnlyRepository)
 {
     this.postReadOnlyRepository = postReadOnlyRepository ??
                                   throw new ArgumentNullException(nameof(postReadOnlyRepository));
     this.postWriteOnlyRepository = postWriteOnlyRepository ??
                                    throw new ArgumentNullException(nameof(postWriteOnlyRepository));
 }
Example #3
0
 public BlogUnitOfWork(
     IPostReadOnlyRepository postReadOnlyRepository,
     IPostCommandRepository postCommandRepository,
     ICommentReadOnlyRepository commentReadOnlyRepository,
     ICommentCommandRepository commentCommandRepository)
 {
     PostReadOnlyRepository    = postReadOnlyRepository;
     PostCommandRepository     = postCommandRepository;
     CommentReadOnlyRepository = commentReadOnlyRepository;
     CommentCommandRepository  = commentCommandRepository;
 }
Example #4
0
 public CreateCommentCommandHandler(
     IPublisher bus,
     IPostReadOnlyRepository postReadOnlyRepository,
     IBlogReadOnlyRepository blogReadOnlyRepository)
 {
     this.bus = bus ??
                throw new ArgumentNullException(nameof(bus));
     this.postReadOnlyRepository = postReadOnlyRepository ??
                                   throw new ArgumentNullException(nameof(postReadOnlyRepository));
     this.blogReadOnlyRepository = blogReadOnlyRepository ??
                                   throw new ArgumentNullException(nameof(blogReadOnlyRepository));
 }
Example #5
0
 public PostCreatedEventHandler(
     IPostReadOnlyRepository postReadOnlyRepository,
     IPostWriteOnlyRepository postWriteOnlyRepository,
     IBlogReadOnlyRepository blogReadOnlyRepository,
     IBlogWriteOnlyRepository blogWriteOnlyRepository)
 {
     this.postReadOnlyRepository = postReadOnlyRepository ??
                                   throw new ArgumentNullException(nameof(postReadOnlyRepository));
     this.postWriteOnlyRepository = postWriteOnlyRepository ??
                                    throw new ArgumentNullException(nameof(postWriteOnlyRepository));
     this.blogReadOnlyRepository = blogReadOnlyRepository ??
                                   throw new ArgumentNullException(nameof(blogReadOnlyRepository));
     this.blogWriteOnlyRepository = blogWriteOnlyRepository ??
                                    throw new ArgumentNullException(nameof(blogWriteOnlyRepository));
 }
Example #6
0
 public PostGetByIdUseCase(IPostReadOnlyRepository postReadOnlyRepository)
 {
     this.postReadOnlyRepository = postReadOnlyRepository;
 }
Example #7
0
 public PostsController(IMediator mediator, IPostReadOnlyRepository postQueries)
 {
     this.mediator    = mediator ?? throw new ArgumentNullException(nameof(mediator));
     this.postQueries = postQueries ?? throw new ArgumentNullException(nameof(postQueries));
 }