Example #1
0
 public GetAttachmentsQueryHandler(
     IMapper mapper,
     IWolkDbContext wolkDbContext)
 {
     _mapper        = mapper;
     _wolkDbContext = wolkDbContext;
 }
 public CreateAttachmentAccessTokenCommandHandler(
     ICreateAccessTokenService createAccessTokenService,
     IWolkDbContext wolkDbContext)
 {
     _createAccessTokenService = createAccessTokenService;
     _wolkDbContext            = wolkDbContext;
 }
 public DeleteAttachmentCommandHandler(
     IFileService fileService,
     IWolkDbContext wolkDbContext,
     IOptions <WolkConfiguration> options)
 {
     _fileService   = fileService;
     _wolkDbContext = wolkDbContext;
     _configuration = options.Value;
 }
Example #4
0
 public UploadBackupCommandHandler(
     IFileService fileService,
     IMapper mapper,
     IWolkDbContext wolkDbContext,
     IOptions <WolkConfiguration> options)
 {
     _fileService       = fileService;
     _mapper            = mapper;
     _wolkDbContext     = wolkDbContext;
     _wolkConfiguration = options.Value;
 }
Example #5
0
 public CreateAttachmentCommandHandler(
     IFileService fileService,
     IMapper mapper,
     IMimeService mimeService,
     IWolkDbContext wolkDbContext,
     IOptions <WolkConfiguration> options)
 {
     _fileService       = fileService;
     _mapper            = mapper;
     _mimeService       = mimeService;
     _wolkDbContext     = wolkDbContext;
     _wolkConfiguration = options.Value;
 }
 public GetAttachmentQueryHandler(
     IDateTime dateTime,
     IFileService fileService,
     IMapper mapper,
     IWolkDbContext wolkDbContext,
     IOptions <WolkConfiguration> options)
 {
     _dateTime          = dateTime;
     _fileService       = fileService;
     _mapper            = mapper;
     _wolkDbContext     = wolkDbContext;
     _wolkConfiguration = options.Value;
 }
        public CreateAttachmentCommandValidator(IWolkDbContext wolkDbContext)
        {
            _wolkDbContext = wolkDbContext;

            RuleFor(c => c.Contents)
            .NotNull()
            .Must(c => c.Length > 0)
            .WithMessage("Please provide a file.");

            RuleFor(c => c.Filename)
            .NotEmpty()
            .MaximumLength(300);

            RuleFor(c => c.NoteId)
            .CustomAsync(NoteExistsAsync);
        }
 public CreateAccessTokenService(IWolkDbContext wolkDbContext)
 {
     _wolkDbContext = wolkDbContext;
 }