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));
        }
示例#2
0
    public RestoreNoteStory(IntegrationFixture fixture)
    {
        _mediator  = fixture.GetService <IMediator>();
        _noteQuery = fixture.GetService <INoteQuery>();

        _noteId = fixture.CreateDefaultNoteAsync(new NoteOptions {
            Status = NoteStatus.Published
        }).GetAwaiter()
                  .GetResult();
    }
示例#3
0
文件: Api.cs 项目: kosorin/onedo-uwp
        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>());
        }
示例#4
0
 public NoteController(
     IMediator mediator,
     INoteQuery noteQuery,
     ICommentQuery commentQuery,
     IMergeRequestQuery mergeRequestQuery)
 {
     _mediator          = mediator;
     _noteQuery         = noteQuery;
     _commentQuery      = commentQuery;
     _mergeRequestQuery = mergeRequestQuery;
 }
示例#5
0
 public NoteTests(IntegrationFixture fixture)
 {
     _fixture   = fixture;
     _mediator  = fixture.GetService <IMediator>();
     _noteQuery = fixture.GetService <INoteQuery>();
 }
示例#6
0
 public SpaceController(IMediator mediator, ISpaceQuery spaceQuery, INoteQuery noteQuery)
 {
     _mediator   = mediator;
     _spaceQuery = spaceQuery;
     _noteQuery  = noteQuery;
 }