public PlayCardCommandHandler(IMediator mediator, IPokerTimeDbContextFactory dbContextFactory, ICurrentParticipantService currentParticipantService, IMapper mapper)
 {
     this._mediator                  = mediator;
     this._dbContextFactory          = dbContextFactory;
     this._currentParticipantService = currentParticipantService;
     this._mapper = mapper;
 }
Example #2
0
        public JoinPokerSessionCommandValidator(IPokerTimeDbContextFactory pokerTimeDbContext, IPassphraseService passphraseService)
        {
            this._pokerTimeDbContext = pokerTimeDbContext;
            this._passphraseService  = passphraseService;

            this.RuleFor(e => e.Name).NotEmpty().MaximumLength(256);
            this.RuleFor(e => e.Color).NotEmpty()
            .WithMessage("Please select a color")
            .Matches("^#?([A-F0-9]{2}){3}$", RegexOptions.IgnoreCase)
            .WithMessage("Please select a color");

            this.RuleFor(e => e.Passphrase)
            .NotEmpty()
            .When(x => x.JoiningAsFacilitator);

            // Passphrase validation
            this.RuleFor(e => e.Passphrase).
            Must((obj, passphrase) => this.MustBeAValidPassphrase(obj.SessionId, obj.JoiningAsFacilitator, obj.Passphrase))
            .WithMessage("This passphrase is not valid. Please try again.");
        }
Example #3
0
 public GetEstimationsOverviewQueryHandler(IPokerTimeDbContextFactory dbContextFactory, IMapper mapper)
 {
     this._dbContextFactory = dbContextFactory;
     this._mapper           = mapper;
 }
Example #4
0
 public InitiateFinishStageCommandHandler(IPokerTimeDbContextFactory pokerTimeDbContext, ISessionStatusUpdateDispatcher sessionStatusUpdateDispatcher) : base(pokerTimeDbContext, sessionStatusUpdateDispatcher)
 {
 }
Example #5
0
 public GetSymbolSetsQueryHandler(IPokerTimeDbContextFactory dbContextFactory, IMapper mapper)
 {
     this._dbContextFactory = dbContextFactory;
     this._mapper           = mapper;
 }