コード例 #1
0
        public GetMessagesQuery(IChatbotService chatbotService, IUnitOfWork unitOfWork)
        {
            Guard.Against.Null(chatbotService, nameof(chatbotService));
            Guard.Against.Null(unitOfWork, nameof(unitOfWork));

            _chatbotService = chatbotService;
            _unitOfWork     = unitOfWork;
        }
コード例 #2
0
        public SendMessageCommand(IRepository <Message> messageRepository,
                                  IEventAggregator eventAgregator,
                                  IChatbotService chabotService,
                                  IUnitOfWork unitOfWork,
                                  IMapper mapper)
        {
            Guard.Against.Null(messageRepository, nameof(messageRepository));
            Guard.Against.Null(eventAgregator, nameof(eventAgregator));
            Guard.Against.Null(chabotService, nameof(chabotService));
            Guard.Against.Null(unitOfWork, nameof(unitOfWork));
            Guard.Against.Null(mapper, nameof(mapper));

            _messageSended     = eventAgregator.GetEvent <MessageSended>();
            _messageRepository = messageRepository;
            _chabotService     = chabotService;
            _unitOfWork        = unitOfWork;
            _mapper            = mapper;
        }