/// <summary>
 /// Initializes a new instance of the <see cref="PostAnswerHandler"/> class.
 /// </summary>
 /// <param name="courseReader">Course reader.</param>
 /// <param name="logger">Logger.</param>
 public PostAnswerHandler(
     ICourseReader courseReader,
     ILogger <PostAnswerHandler> logger)
 {
     this.courseReader = courseReader ?? throw new ArgumentNullException(nameof(courseReader));
     this.logger       = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MemberRoleHandler"/> class.
 /// </summary>
 /// <param name="courseReader">Course reader.</param>
 /// <param name="authorizationSettings">AuthZ settings.</param>
 /// <param name="logger">Logger.</param>
 public MemberRoleHandler(
     ICourseReader courseReader,
     AuthorizationSettings authorizationSettings,
     ILogger <MemberRoleHandler> logger)
 {
     this.courseReader          = courseReader ?? throw new ArgumentNullException(nameof(courseReader));
     this.authorizationSettings = authorizationSettings ?? throw new ArgumentNullException(nameof(authorizationSettings));
     this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TutorialGroupsController"/> class.
 /// </summary>
 /// <param name="courseReader">CourseReader.</param>
 /// <param name="courseSetup">Course setup.</param>
 /// <param name="tutorialGroupSetup">Tutorial group setup.</param>
 /// <param name="logger">Logger.</param>
 /// <param name="authorizationService">AuthZ service.</param>
 public TutorialGroupsController(
     ICourseReader courseReader,
     ICourseSetup courseSetup,
     ITutorialGroupSetup tutorialGroupSetup,
     ILogger <TutorialGroupsController> logger,
     IAuthorizationService authorizationService)
 {
     this.courseReader         = courseReader ?? throw new System.ArgumentNullException(nameof(courseReader));
     this.courseSetup          = courseSetup ?? throw new System.ArgumentNullException(nameof(courseSetup));
     this.tutorialGroupSetup   = tutorialGroupSetup ?? throw new System.ArgumentNullException(nameof(tutorialGroupSetup));
     this.logger               = logger ?? throw new System.ArgumentNullException(nameof(logger));
     this.authorizationService = authorizationService ?? throw new System.ArgumentNullException(nameof(authorizationService));
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CoursesController"/> class.
 /// </summary>
 /// <param name="logger">Logger.</param>
 /// <param name="courseReader">CourseReader.</param>
 /// <param name="courseSetup">Course setup.</param>
 /// <param name="questionReader">Question reader.</param>
 /// <param name="qBotService">QBot Service.</param>
 /// <param name="authorizationService">AuthZ service.</param>
 public CoursesController(
     ILogger <CoursesController> logger,
     ICourseReader courseReader,
     ICourseSetup courseSetup,
     IQuestionReader questionReader,
     IQBotService qBotService,
     IAuthorizationService authorizationService)
 {
     this.logger               = logger ?? throw new ArgumentNullException(nameof(logger));
     this.courseSetup          = courseSetup ?? throw new ArgumentNullException(nameof(courseSetup));
     this.courseReader         = courseReader ?? throw new ArgumentNullException(nameof(courseReader));
     this.questionReader       = questionReader ?? throw new ArgumentNullException(nameof(questionReader));
     this.qBotService          = qBotService ?? throw new ArgumentNullException(nameof(qBotService));
     this.authorizationService = authorizationService ?? throw new ArgumentNullException(nameof(authorizationService));
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UsersController"/> class.
 /// </summary>
 /// <param name="courseReader">Course Reader.</param>
 /// <param name="questionReader">Question reader.</param>
 /// <param name="userProfileService">User profile service.</param>
 /// <param name="authorizationService">AuthZ service.</param>
 /// <param name="authorizationSettings">Auth settings.</param>
 /// <param name="kbReader">The knowledge base reader.</param>
 /// <param name="logger">Logger.</param>
 public UsersController(
     ICourseReader courseReader,
     IQuestionReader questionReader,
     IUserReaderService userProfileService,
     IAuthorizationService authorizationService,
     AuthorizationSettings authorizationSettings,
     IKnowledgeBaseReader kbReader,
     ILogger <UsersController> logger)
 {
     this.courseReader          = courseReader ?? throw new ArgumentNullException(nameof(courseReader));
     this.questionReader        = questionReader ?? throw new ArgumentNullException(nameof(questionReader));
     this.userReaderService     = userProfileService ?? throw new ArgumentNullException(nameof(userProfileService));
     this.authorizationService  = authorizationService ?? throw new ArgumentNullException(nameof(authorizationService));
     this.authorizationSettings = authorizationSettings ?? throw new ArgumentNullException(nameof(authorizationSettings));
     this.kbReader = kbReader ?? throw new ArgumentNullException(nameof(kbReader));
     this.logger   = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 /// <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));
 }
Пример #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BotActivityHandler"/> class.
 /// </summary>
 /// <param name="qBotTeamInfo">QBot Team info.</param>
 /// <param name="courseReader">Course reader.</param>
 /// <param name="courseSetup">Couse setup.</param>
 /// <param name="qBotService">QBotService.</param>
 /// <param name="urlProvider">Url Provider.</param>
 /// <param name="messageFactory">Teams message factory.</param>
 /// <param name="localizer">Localizer.</param>
 /// <param name="appSettings">App settings.</param>
 /// <param name="logger">Logger.</param>
 public BotActivityHandler(
     IQBotTeamInfo qBotTeamInfo,
     ICourseReader courseReader,
     ICourseSetup courseSetup,
     IQBotService qBotService,
     IUrlProvider urlProvider,
     IMessageFactory messageFactory,
     IStringLocalizer <Strings> localizer,
     IAppSettings appSettings,
     ILogger <BotActivityHandler> logger)
 {
     this.qBotTeamInfo   = qBotTeamInfo ?? throw new ArgumentNullException(nameof(qBotTeamInfo));
     this.courseReader   = courseReader ?? throw new ArgumentNullException(nameof(courseReader));
     this.courseSetup    = courseSetup ?? throw new ArgumentNullException(nameof(courseSetup));
     this.qBotService    = qBotService ?? throw new ArgumentNullException(nameof(qBotService));
     this.urlProvider    = urlProvider ?? throw new ArgumentNullException(nameof(urlProvider));
     this.messageFactory = messageFactory ?? throw new ArgumentNullException(nameof(messageFactory));
     this.localizer      = localizer ?? throw new ArgumentNullException(nameof(localizer));
     this.appSettings    = appSettings ?? throw new ArgumentNullException(nameof(appSettings));
     this.logger         = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 public CourseController(ICourseReader courseReader)
 {
     _courseReader = courseReader;
 }