Esempio n. 1
0
 public SetAnswersBase(QnaDataContext dataContext, INotRequiredProcessor notRequiredProcessor, ITagProcessingService tagProcessingService, IAnswerValidator answerValidator)
 {
     _dataContext          = dataContext;
     _notRequiredProcessor = notRequiredProcessor;
     _tagProcessingService = tagProcessingService;
     _answerValidator      = answerValidator;
 }
Esempio n. 2
0
 public Handler(IUserInterface ui, ISettings settings, Iterator iterator, Calculator calculator, StrictAnswerValidator validator)
 {
     _ui         = ui;
     _settings   = settings;
     _iterator   = iterator;
     _calculator = calculator;
     _validator  = validator;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QBotService"/> class.
 /// </summary>
 /// <param name="questionValidator">Question validator.</param>
 /// <param name="answerValidator">Answer validator.</param>
 /// <param name="questionRespository">Question repository.</param>
 /// <param name="teamsMessageService">Teams message service.</param>
 /// <param name="courseReader">Course reader.</param>
 /// <param name="qnAService">QnA Service.</param>
 /// <param name="userReaderService">User profile reader  service.</param>
 /// <param name="logger">Logger.</param>
 public QBotService(
     IQuestionValidator questionValidator,
     IAnswerValidator answerValidator,
     IQuestionRespository questionRespository,
     ITeamsMessageService teamsMessageService,
     ICourseReader courseReader,
     IQnAService qnAService,
     IUserReaderService userReaderService,
     ILogger <QBotService> logger)
 {
     this.questionValidator   = questionValidator ?? throw new ArgumentNullException(nameof(questionValidator));
     this.answerValidator     = answerValidator ?? throw new ArgumentNullException(nameof(answerValidator));
     this.questionRespository = questionRespository ?? throw new ArgumentNullException(nameof(questionRespository));
     this.teamsMessageService = teamsMessageService ?? throw new ArgumentNullException(nameof(teamsMessageService));
     this.courseReader        = courseReader ?? throw new ArgumentNullException(nameof(courseReader));
     this.qnAService          = qnAService ?? throw new ArgumentNullException(nameof(qnAService));
     this.userReaderService   = userReaderService ?? throw new ArgumentNullException(nameof(userReaderService));
     this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 public QuestionValidator(IAnswerValidator answerValidator)
 {
     this.answerValidator = answerValidator;
 }
Esempio n. 5
0
 public FlashcardsService(IFlashcardService service, IAnswerValidator validator)
 {
     this.service   = service;
     this.validator = validator;
 }
 public SubmitPageOfFilesHandler(QnaDataContext dataContext, IOptions <FileStorageConfig> fileStorageConfig, IEncryptionService encryptionService, IAnswerValidator answerValidator, IFileContentValidator fileContentValidator, INotRequiredProcessor notRequiredProcessor, ITagProcessingService tagProcessingService) : base(dataContext, notRequiredProcessor, tagProcessingService, answerValidator)
 {
     _fileStorageConfig    = fileStorageConfig;
     _encryptionService    = encryptionService;
     _fileContentValidator = fileContentValidator;
 }
Esempio n. 7
0
 public SetPageAnswersBySectionNoHandler(QnaDataContext dataContext, IAnswerValidator answerValidator, INotRequiredProcessor notRequiredProcessor, ITagProcessingService tagProcessingService) : base(dataContext, notRequiredProcessor, tagProcessingService, answerValidator)
 {
 }
Esempio n. 8
0
 private void SetupValidator(IAnswerValidator validator)
 {
     this._flashcardsService = new FlashcardsService(service.Object, validator);
 }
Esempio n. 9
0
 public void Setup()
 {
     validator = new AnswerValidator();
 }
Esempio n. 10
0
 public DeleteFileHandler(QnaDataContext dataContext, IAnswerValidator answerValidator, IOptions <FileStorageConfig> fileStorageConfig)
 {
     _dataContext       = dataContext;
     _fileStorageConfig = fileStorageConfig;
     _answerValidator   = answerValidator;
 }
 public AddPageAnswerHandler(QnaDataContext dataContext, IAnswerValidator answerValidator) : base(dataContext)
 {
     _dataContext     = dataContext;
     _answerValidator = answerValidator;
 }