Ejemplo n.º 1
0
 public GetUserQueryHandler(
     IMapper mapper,
     IPlagiarismCheckerDbContext plagiarismCheckerDbContext
     )
 {
     this._mapper = mapper;
     this._plagiarismCheckerDbContext = plagiarismCheckerDbContext;
 }
Ejemplo n.º 2
0
 public GetUserSearchHistoryQueryHandler(
     IPlagiarismCheckerDbContext plagiarismCheckerDbContext,
     IMapper mapper
     )
 {
     this._plagiarismCheckerDbContext = plagiarismCheckerDbContext;
     this._mapper = mapper;
 }
 public CheckTextForPlagiarismForUserCommandHandler(
     IRequestHandler <CheckTextForPlagiarismCommand, CheckTextForPlagiarismDto> checkTextForPlagiarism,
     IMapper mapper,
     IPlagiarismCheckerDbContext plagiarismCheckerDbContext,
     IDateTime dateTime
     )
 {
     this._checkTextForPlagiarism = checkTextForPlagiarism;
     this._mapper = mapper;
     this._plagiarismCheckerDbContext = plagiarismCheckerDbContext;
     this._dateTime = dateTime;
 }
        public CheckTextForPlagiarismForUserCommandValidator(
            IPlagiarismCheckerDbContext plagiarismCheckerDbContext
            )
        {
            this._plagiarismCheckerDbContext = plagiarismCheckerDbContext;

            RuleFor(x => x.Username)
            .NotEmpty().WithMessage("Username must not be empty!")
            .MustAsync(UserNotExists).WithMessage("The specified username does not exists!");

            RuleFor(x => x.TextToCheck)
            .NotEmpty().WithMessage("TextToCheck must not be empty!");
        }
Ejemplo n.º 5
0
        public LoginUserCommandValidator(
            IPlagiarismCheckerDbContext plagiarismCheckerDbContext
            )
        {
            this._plagiarismCheckerDbContext = plagiarismCheckerDbContext;

            RuleFor(x => x.Username)
            .NotEmpty().WithMessage("Username must not be empty!")
            .MustAsync(UserNotExists).WithMessage("The specified username does not exists!");

            RuleFor(x => x.Password)
            .NotEmpty().WithMessage("Password must not be empty!");
        }
Ejemplo n.º 6
0
        public AddUserCommandValidator(
            IPlagiarismCheckerDbContext plagiarismCheckerDbContext
            )
        {
            this._plagiarismCheckerDbContext = plagiarismCheckerDbContext;

            RuleFor(x => x.Name)
            .NotEmpty().WithMessage("Name must not be empty!");


            RuleFor(x => x.Surname)
            .NotEmpty().WithMessage("Surname must not be empty!");


            RuleFor(x => x.Username)
            .NotEmpty().WithMessage("Username must not be empty!")
            .MustAsync(BeUniqueUsername).WithMessage("The specified username already exists!");


            RuleFor(x => x.Password)
            .NotEmpty().WithMessage("Password must not be empty!");
        }
 public LoginUserCommandHandler(
     IPlagiarismCheckerDbContext plagiarismCheckerDbContext
     )
 {
     this._plagiarismCheckerDbContext = plagiarismCheckerDbContext;
 }