Esempio n. 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));
 }
Esempio n. 3
0
 public BlogUnitOfWork(
     IPostReadOnlyRepository postReadOnlyRepository,
     IPostCommandRepository postCommandRepository,
     ICommentReadOnlyRepository commentReadOnlyRepository,
     ICommentCommandRepository commentCommandRepository)
 {
     PostReadOnlyRepository    = postReadOnlyRepository;
     PostCommandRepository     = postCommandRepository;
     CommentReadOnlyRepository = commentReadOnlyRepository;
     CommentCommandRepository  = commentCommandRepository;
 }
Esempio n. 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));
 }
Esempio n. 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));
 }
Esempio n. 6
0
 public PostGetByIdUseCase(IPostReadOnlyRepository postReadOnlyRepository)
 {
     this.postReadOnlyRepository = postReadOnlyRepository;
 }
Esempio n. 7
0
 public PostsController(IMediator mediator, IPostReadOnlyRepository postQueries)
 {
     this.mediator    = mediator ?? throw new ArgumentNullException(nameof(mediator));
     this.postQueries = postQueries ?? throw new ArgumentNullException(nameof(postQueries));
 }