Esempio n. 1
0
        public void Initialize()
        {
            _repository      = A.Fake <IUserRepository>();
            _mediatorFactory = A.Fake <IMediatorFactory>();

            _sut = new Application.Features.User.Register.RegisterUserMediatorCommandHandler(_repository, _mediatorFactory);
        }
Esempio n. 2
0
 public AuthenticateUserMediatorCommandHandler(IReadUserRepository readUserRepository, IUserRepository userRepository, IMediatorFactory mediatorFactory, ISecurityService securityService)
 {
     _readUserRepository = readUserRepository;
     _userRepository     = userRepository;
     _mediatorFactory    = mediatorFactory;
     _securityService    = securityService;
 }
Esempio n. 3
0
        public void Initialize()
        {
            _mediatorFactory = A.Fake <IMediatorFactory>();
            _repository      = A.Fake <ITicketRepository>();

            _sut = new RegisterTicketMediatorCommandHandler(_mediatorFactory, _repository);
        }
Esempio n. 4
0
        public void Initialize()
        {
            _readUserRepository = A.Fake <IReadUserRepository>();
            _userRepository     = A.Fake <IUserRepository>();
            _mediatorFactory    = A.Fake <IMediatorFactory>();
            _securityService    = A.Fake <ISecurityService>();

            _authenticateUserMediatorCommandBuilder           = new AuthenticateUserMediatorCommandBuilder();
            _authenticateUserMediatorCommandResponseBuilder   = new AuthenticateUserMediatorCommandResponseBuilder();
            _validateHashedPasswordMediatorQueryBuilder       = new ValidateHashedPasswordMediatorQueryBuilder();
            _validateHashedPasswordMediatorQueryResultBuilder = new ValidateHashedPasswordMediatorQueryResultBuilder();
            _domainUserBuilder    = new DomainUserBuilder();
            _readUserModelBuilder = new ReadUserModelBuilder();

            _sut = new AuthenticateUserMediatorCommandHandler(_readUserRepository, _userRepository, _mediatorFactory, _securityService);
        }
Esempio n. 5
0
        public HostedService(
            ILogger <HostedService> logger,
            IHostApplicationLifetime appLifetime,
            ISqlConnectionManager sqlConnectionManager,
            IDatabaseContext dbContext,
            IMediatorFactory mediatorFactory
            )
        {
            _logger               = logger;
            _mediatorFactory      = mediatorFactory;
            _sqlConnectionManager = sqlConnectionManager;
            _dbContext            = dbContext;

            appLifetime.ApplicationStarted.Register(OnStarted);
            appLifetime.ApplicationStopping.Register(OnStopping);
            appLifetime.ApplicationStopped.Register(OnStopped);
        }
Esempio n. 6
0
 /// <summary>
 /// CTor
 /// </summary>
 /// <param name="mediatorFactory"></param>
 /// <param name="httpContextAccessor"></param>
 public TicketsController(IMediatorFactory mediatorFactory, IHttpContextAccessor httpContextAccessor)
 {
     _mediatorFactory     = mediatorFactory;
     _httpContextAccessor = httpContextAccessor;
 }
Esempio n. 7
0
 public RegisterUserMediatorCommandHandler(IUserRepository repository, IMediatorFactory mediatorFactory)
 {
     _repository      = repository;
     _mediatorFactory = mediatorFactory;
 }
        /*============================================================================*/
        /* Constructor                                                                */
        /*============================================================================*/

        public MediatorViewHandler(IMediatorFactory factory)
        {
            _factory = factory;
        }
Esempio n. 9
0
 /// <summary>
 /// CTor
 /// </summary>
 /// <param name="mediatorFactory"></param>
 public UsersController(IMediatorFactory mediatorFactory)
 {
     _mediatorFactory = mediatorFactory;
 }
Esempio n. 10
0
 public RegisterTicketMediatorCommandHandler(IMediatorFactory mediatorFactory, ITicketRepository repository)
 {
     _mediatorFactory = mediatorFactory;
     _repository      = repository;
 }
        /*============================================================================*/
        /* Constructor                                                                */
        /*============================================================================*/

        public MediatorMap(IContext context)
        {
            _logger      = context.GetLogger(this);
            _factory     = new MediatorFactory(context.injector);
            _viewHandler = new MediatorViewHandler(_factory);
        }
		/*============================================================================*/
		/* Constructor                                                                */
		/*============================================================================*/

		public MediatorViewHandler (IMediatorFactory factory)
		{
			_factory = factory;
		}