Exemple #1
0
 public AddNoteCommandHandler(IReturnDbContextFactory returnDbContextFactory, ICurrentParticipantService currentParticipantService, ISecurityValidator securityValidator, IMediator mediator, IMapper mapper, ISystemClock systemClock)
 {
     this._returnDbContextFactory    = returnDbContextFactory;
     this._currentParticipantService = currentParticipantService;
     this._securityValidator         = securityValidator;
     this._mediator    = mediator;
     this._mapper      = mapper;
     this._systemClock = systemClock;
 }
        public DeleteNoteCommandHandlerTests()
        {
            this._currentParticipantService = Substitute.For <ICurrentParticipantService>();
            this._currentParticipantService.GetParticipant().
            Returns(new ValueTask <CurrentParticipantModel>(new CurrentParticipantModel(1, "Derp", false)));

            this._systemClock = Substitute.For <ISystemClock>();
            this._systemClock.CurrentTimeOffset.Returns(DateTimeOffset.UnixEpoch);
        }
Exemple #3
0
 public CastVoteCommandHandlerTests()
 {
     this._currentParticipantService = Substitute.For <ICurrentParticipantService>();
     this._currentParticipantService.GetParticipant().
     Returns((ci) => {
         Participant p = this.Context.Participants.Last();
         return(new ValueTask <CurrentParticipantModel>(new CurrentParticipantModel(p.Id, p.Name, p.IsFacilitator)));
     });
 }
        public RequestPerformanceBehaviour(
            ILogger <TRequest> logger,
            ICurrentParticipantService currentParticipantService
            )
        {
            this._timer = new Stopwatch();

            this._logger = logger;
            this._currentParticipantService = currentParticipantService;
        }
Exemple #5
0
 public RequestLogger(ILogger <TRequest> logger, ICurrentParticipantService currentUserService)
 {
     this._logger             = logger;
     this._currentUserService = currentUserService;
 }
Exemple #6
0
 public SecurityValidator(ICurrentParticipantService currentParticipantService, ILogger <SecurityValidator> logger)
 {
     this._currentParticipantService = currentParticipantService;
     this._logger = logger;
 }
 public GetRetrospectiveLaneContentQueryHandler(IReturnDbContext returnDbContext, IMapper mapper, ICurrentParticipantService currentParticipantService, ITextAnonymizingService textAnonymizingService)
 {
     this._returnDbContext           = returnDbContext;
     this._mapper                    = mapper;
     this._currentParticipantService = currentParticipantService;
     this._textAnonymizingService    = textAnonymizingService;
 }
Exemple #8
0
 public RejoinPokerSessionCommandHandler(IPokerTimeDbContext pokerTimeDbContext, ICurrentParticipantService currentParticipantService)
 {
     this._pokerTimeDbContext        = pokerTimeDbContext;
     this._currentParticipantService = currentParticipantService;
 }
 public PlayCardCommandHandler(IMediator mediator, IPokerTimeDbContextFactory dbContextFactory, ICurrentParticipantService currentParticipantService, IMapper mapper)
 {
     this._mediator                  = mediator;
     this._dbContextFactory          = dbContextFactory;
     this._currentParticipantService = currentParticipantService;
     this._mapper = mapper;
 }
Exemple #10
0
 public JoinPokerSessionCommandHandler(IPokerTimeDbContext pokerTimeDbContext, ICurrentParticipantService currentParticipantService, IMediator mediator, IMapper mapper)
 {
     this._pokerTimeDbContext        = pokerTimeDbContext;
     this._currentParticipantService = currentParticipantService;
     this._mediator = mediator;
     this._mapper   = mapper;
 }
 public static void SetNoHttpContext(this ICurrentParticipantService currentParticipantService) =>
 typeof(CurrentParticipantService).GetMethod("HttpContext", BindingFlags.NonPublic | BindingFlags.Instance)?.
 Invoke(currentParticipantService, null);
 public RejoinRetrospectiveCommandHandler(IReturnDbContext returnDbContext, ICurrentParticipantService currentParticipantService)
 {
     this._returnDbContext           = returnDbContext;
     this._currentParticipantService = currentParticipantService;
 }