public NoteRepository(
            INoteQuery noteQuery,
            IAddNoteCommand addNoteCommand,
            IAddTagsCommand addTagsCommand,
            IDeleteNotesCommand deleteNotesCommand,
            IUpdateNoteCommand updateNoteCommand,
            UserManager <AppUser> userManager)
        {
            _noteQuery = noteQuery
                         ?? throw new ArgumentNullException(nameof(noteQuery));

            _addNoteCommand = addNoteCommand
                              ?? throw new ArgumentNullException(nameof(addNoteCommand));

            _addTagsCommand = addTagsCommand
                              ?? throw new ArgumentNullException(nameof(addTagsCommand));

            _deleteNotesCommand = deleteNotesCommand
                                  ?? throw new ArgumentNullException(nameof(deleteNotesCommand));

            _updateNoteCommand = updateNoteCommand
                                 ?? throw new ArgumentNullException(nameof(_updateNoteCommand));

            _userManager = userManager
                           ?? throw new ArgumentNullException(nameof(userManager));
        }
Exemple #2
0
    public RestoreNoteStory(IntegrationFixture fixture)
    {
        _mediator  = fixture.GetService <IMediator>();
        _noteQuery = fixture.GetService <INoteQuery>();

        _noteId = fixture.CreateDefaultNoteAsync(new NoteOptions {
            Status = NoteStatus.Published
        }).GetAwaiter()
                  .GetResult();
    }
Exemple #3
0
        public Api()
        {
            dataService = new DataService();

            EventBus   = new EventBus();
            CommandBus = new CommandBus(EventBus, dataService);

            FolderQuery = new FolderQuery(dataService.GetQueryRepository <FolderData>());
            NoteQuery   = new NoteQuery(dataService.GetQueryRepository <NoteData>());
        }
Exemple #4
0
 public NoteController(
     IMediator mediator,
     INoteQuery noteQuery,
     ICommentQuery commentQuery,
     IMergeRequestQuery mergeRequestQuery)
 {
     _mediator          = mediator;
     _noteQuery         = noteQuery;
     _commentQuery      = commentQuery;
     _mergeRequestQuery = mergeRequestQuery;
 }
Exemple #5
0
 public NoteTests(IntegrationFixture fixture)
 {
     _fixture   = fixture;
     _mediator  = fixture.GetService <IMediator>();
     _noteQuery = fixture.GetService <INoteQuery>();
 }
Exemple #6
0
 public SpaceController(IMediator mediator, ISpaceQuery spaceQuery, INoteQuery noteQuery)
 {
     _mediator   = mediator;
     _spaceQuery = spaceQuery;
     _noteQuery  = noteQuery;
 }