Exemplo n.º 1
0
 public UserService(ITokenHelper tokenHelper, IUserRepository userRepository, IUserQuery userQuery, IMapper mapper)
 {
     this._tokenHelper    = tokenHelper;
     this._userRepository = userRepository;
     this._userQuery      = userQuery;
     this._mapper         = mapper;
 }
Exemplo n.º 2
0
 public RaceService(IRaceFileReader raceFileProcessor,
                    IRaceRepository raceRepository,
                    IRaceQuery raceQuery,
                    IRaceTypeRepository raceTypeRepository,
                    IRaceTypeQuery raceTypeQuery,
                    IUserRepository userRepository,
                    IUserQuery userQuery,
                    ILapRepository lapRepository,
                    IDriverResultRepository driverResultRepository,
                    IDriverResultQuery driverResultQuery,
                    IOptions <FileServerSettings> fileServerOptions,
                    IOptions <RaceFileSettings> raceFileOptions,
                    IMapper mapper)
 {
     this._raceFileReader         = raceFileProcessor;
     this._raceRepository         = raceRepository;
     this._raceQuery              = raceQuery;
     this._raceTypeRepository     = raceTypeRepository;
     this._raceTypeQuery          = raceTypeQuery;
     this._userRepository         = userRepository;
     this._userQuery              = userQuery;
     this._lapRepository          = lapRepository;
     this._driverResultRepository = driverResultRepository;
     this._driverResultQuery      = driverResultQuery;
     this._fileServerSettings     = fileServerOptions.Value;
     this._raceFileSettings       = raceFileOptions.Value;
     this._mapper = mapper;
 }
Exemplo n.º 3
0
 public UserService(IGuidWrapper guidWrapper, IDateTimeWrapper dateTimeWrapper, IStore <User> userStore, IUserQuery userQuery)
 {
     _guidWrapper     = guidWrapper;
     _dateTimeWrapper = dateTimeWrapper;
     _userStore       = userStore;
     _userQuery       = userQuery;
 }
Exemplo n.º 4
0
 public UsersController(IUserQuery userQuery, IUserCommand userCommand, IUrlHelper urlHelper, ILogger <UsersController> logger)
 {
     _userQuery   = userQuery;
     _userCommand = userCommand;
     _urlHelper   = urlHelper;
     _logger      = logger;
 }
 public ProviderCommentQuery(ICommentQuery commentQuery, ICommentRepository commentRepository,
                             IUserQuery userQuery, IUserRepositiory userRepositiory)
 {
     this.commentQuery      = commentQuery;
     this.commentRepository = commentRepository;
     this.userQuery         = userQuery;
     this.userRepositiory   = userRepositiory;
 }
Exemplo n.º 6
0
 public UserService(IUserQuery userQuery, IUserRepository userRepository, IUserValidator userValidator, IHmacHelper hmacHelper, IUserFactory userFactory)
 {
     _userQuery      = userQuery;
     _userRepository = userRepository;
     _userValidator  = userValidator;
     _hmacHelper     = hmacHelper;
     _userFactory    = userFactory;
 }
Exemplo n.º 7
0
 public FormMain()
 {
     _context = new DawidPerdekContext();
     _writeStudentRepository = new WriteRepository <Student>(_context);
     _readStudentRepository  = new ReadRepository <Student>(_context);
     _userQuery = new UserQuery(_context);
     InitializeComponent();
 }
Exemplo n.º 8
0
 public AuthService(IPasswordHasher <UserModelBase> passwordHasher, IHttpContextAccessor httpContextAccessor,
                    ILoggerFactory loggerFactory, IUserQuery userQuery)
 {
     _passwordHasher      = passwordHasher;
     _httpContextAccessor = httpContextAccessor;
     _userQuery           = userQuery;
     _logger = loggerFactory.CreateLogger(GetType().FullName);
 }
Exemplo n.º 9
0
 public UsersController(IMediator mediator,
                        IUserQuery userQuery,
                        ICarQuery carQuery)
 {
     _mediator  = mediator;
     _userQuery = userQuery;
     _carQuery  = carQuery;
 }
Exemplo n.º 10
0
 public UsersController(IMapper mapper, ILoggerManager logger,
                        IUserQuery userQuery,
                        IUserCommand userCommand) :
     base(mapper, logger)
 {
     _userQuery   = userQuery;
     _userCommand = userCommand;
 }
Exemplo n.º 11
0
 public UserService(IUserRepository userRepository,
                    IUserQuery userQuery,
                    IPublisher publisher)
 {
     _userRepository = userRepository;
     _userQuery      = userQuery;
     _publisher      = publisher;
 }
Exemplo n.º 12
0
 public CheckoutModel(IUserQuery userQuery, ICartService cartService, IProductQuery productQuery, ICalculateCart calculateCart, IZarinPalFactory zarinPalFactory, IOrderApplication orderApplication)
 {
     _userQuery        = userQuery;
     _cartService      = cartService;
     _productQuery     = productQuery;
     _calculateCart    = calculateCart;
     _zarinPalFactory  = zarinPalFactory;
     _orderApplication = orderApplication;
 }
Exemplo n.º 13
0
 public UserApiController(IFeedEntryQuery feedEntryQuery,
     IFeedQuery feedQuery,
     IGenericRepository<FeedMetaData> genericRepository,
     IUserQuery userQuery)
 {
     _feedEntryQuery = feedEntryQuery;
     _feedQuery = feedQuery;
     _genericRepository = genericRepository;
     _userQuery = userQuery;
 }
Exemplo n.º 14
0
 public UserController(IUserQuery userQuery,
                       IModuleQuery moduleQuery,
                       IReferenceDataQuery<ApplicationRole> applicationRoleReferenceDataQuery,
                       IReferenceDataQuery<BusinessUnit> businessUnitReferenceDataQuery
     )
 {
     _userQuery = userQuery;
     _moduleQuery = moduleQuery;
     _applicationRoleReferenceDataQuery = applicationRoleReferenceDataQuery;
     _businessUnitReferenceDataQuery = businessUnitReferenceDataQuery;
 }
 public DataQueryService(IDeansOfficeQuery deansOfficeQuery, ILoginQueryDao loginQuery, ISessionGenerator sessionGenerator, IEventsQuery eventsQuery, IMessageQuery messageQuery, ILibraryQuery libraryQuery, IUnitQuery unitQuery, IUserQuery userQuery, IDepartmentQuery departmentQuery)
 {
     _deansOfficeQuery = deansOfficeQuery ?? new DeansOfficeQuery();
     _loginQuery       = loginQuery ?? new LoginQueryDao();
     _sessionGenerator = sessionGenerator ?? new SessionGenerator();
     _eventsQuery      = eventsQuery ?? new EventsQueryDao();
     _messageQuery     = messageQuery ?? new MessageQueryDao();
     _libraryQuery     = libraryQuery ?? new LibraryQueryDao();
     _unitQuery        = unitQuery ?? new UnitQueryDao();
     _userQuery        = userQuery ?? new UserQueryDao();
     _departmentQuery  = departmentQuery ?? new DepartmentQueryDao();
 }
Exemplo n.º 16
0
 public ChatHub(
     IAddMessageChatCommandHandler addMessageChatCommandHandler,
     IUserQuery userQuery,
     IReadMessagesChatCommandHandler editMessageChatCommandHandler,
     IChatQuery chatQuery
     )
 {
     _addMessageChatCommandHandler = addMessageChatCommandHandler;
     _userQuery = userQuery;
     _editMessageChatCommandHandler = editMessageChatCommandHandler;
     _chatQuery = chatQuery;
 }
Exemplo n.º 17
0
 public UserController(
     IAddUserCommandHandler addUserCommandHandler,
     IUserQuery userQuery,
     IEditUserCommandHandler editUserCommandHandler,
     IDeleteUserCommandHandler deleteUserCommandHandler
     )
 {
     _addUserCommandHandler    = addUserCommandHandler;
     _userQuery                = userQuery;
     _editUserCommandHandler   = editUserCommandHandler;
     _deleteUserCommandHandler = deleteUserCommandHandler;
 }
Exemplo n.º 18
0
 public AccountUseCase(
     Lazy <IDbTransactionManager> dbTransationManagerLazy,
     IMapper mapper,
     ICreateUserCommand createUserCommand,
     ICreateTokenCommand createTokenCommand,
     IUserQuery userQuery)
 {
     this.dbTransationManagerLazy = dbTransationManagerLazy;
     this.mapper             = mapper;
     this.createUserCommand  = createUserCommand;
     this.createTokenCommand = createTokenCommand;
     this.userQuery          = userQuery;
 }
Exemplo n.º 19
0
        public CreatorOfInctances(IArticleQuery articleQuery, ICommentQuery commentQuery,
                                  IUserQuery userQuery, IArticleRepository articleRepository,
                                  ICommentRepository commentRepository, IUserRepositiory userRepositiory,
                                  IQuestionnaireQuery questionnaireQuery, IWebBlogRatingRepository webBlogRatingRepository)
        {
            _instanceArticleQuery       = articleQuery;
            _instanceCommentQuery       = commentQuery;
            _instanceUserQuery          = userQuery;
            _instanceQuestionnaireQuery = questionnaireQuery;

            _instanceArticleRepository       = articleRepository;
            _instanceCommentRepository       = commentRepository;
            _instanceUserRepositiory         = userRepositiory;
            _instanceWebBlogRatingRepository = webBlogRatingRepository;
        }
        //----------------------------------------------------------------//

        public override async Task <Message> ExecuteAsync(Message message)
        {
            User        sender  = message.From;
            Boolean     isAdded = false;
            ControlUser user    = new ControlUser(sender.Id, sender.FirstName, sender.LastName, sender.Username);

            using (ISession session = SessionFactory.CreateSession())
            {
                ICommand <ControlUser, Int32> userCommand = CommandFactory.CreateCommand <ICommand <ControlUser, Int32> >(session);
                IUserQuery userQuery = QueryFactory.CreateQuery <IUserQuery>(session);
                isAdded = await QueryHelper.SaveIfNotExist(userCommand, userQuery, user);
            }

            String resultMessage = isAdded ? ControlUserMessage.UserAdded(sender.Id) : ControlUserMessage.UserExist(sender.Id);

            return(await BotClient.SendTextMessageAsync(message.Chat.Id, resultMessage, replyToMessageId : message.MessageId));
        }
Exemplo n.º 21
0
        public ContactsController(
            IContactQuery contactQuery,
            IUserQuery userQuery,
            IAddContactCommandHandler addContactCommandHandler,
            IDeleteContactNotificationCommandHandler deleteContactNotificationCommandHandler,
            IAddContactNotificationCommandHandler addContactNotificationCommandHandler,
            IDeleteContactCommandHandler deleteContactCommandHandler
            )

        {
            _contactQuery             = contactQuery;
            _userQuery                = userQuery;
            _addContactCommandHandler = addContactCommandHandler;
            _deleteContactNotificationCommandHandler = deleteContactNotificationCommandHandler;
            _addContactNotificationCommandHandler    = addContactNotificationCommandHandler;
            _deleteContactCommandHandler             = deleteContactCommandHandler;
        }
Exemplo n.º 22
0
        //----------------------------------------------------------------//

        public async Task <ProcessResult> TryGenerateOrUpdateSequence(ISession session, String nameCase, String[] userNames)
        {
            String result = null;
            IEnumerable <UserCaseSequencer> sequencers = null;

            ICaseQuery caseQuery = QueryFactory.CreateQuery <ICaseQuery>(session);
            Case       @case     = await caseQuery.GetCaseByNameAsync(nameCase);

            if (@case != null)
            {
                IUserQuery userQuery            = QueryFactory.CreateQuery <IUserQuery>(session);
                IEnumerable <ControlUser> users = await userQuery.GetItemsAsync(userNames);

                if (users.Count() == userNames.Length)
                {
                    ICommand <UserCaseSequencer, UserCaseSequencerId> sequencerCommand = CommandFactory.CreateCommand <ICommand <UserCaseSequencer, UserCaseSequencerId> >(session);
                    ICommand <Case, Int32> caseCommand = CommandFactory.CreateCommand <ICommand <Case, Int32> >(session);
                    IQuery <UserCaseSequencer, UserCaseSequencerId> sequencerQuery = QueryFactory.CreateQuery <IQuery <UserCaseSequencer, UserCaseSequencerId> >(session);

                    sequencers = users.Select((u, i) => new UserCaseSequencer(@case, u, i));
                    sequencers = await sequencerCommand.SaveOrUpdateCollectionAsync(sequencerQuery, sequencers);

                    @case.NextUserId = sequencers.OrderBy(i => i.Sequence).First().Id.UserId;
                    await caseCommand.UpdateAsync(@case);
                }
                else
                {
                    result = UserMessages.UsersNotExist(GetNotExistUsers(users, userNames));
                }
            }
            else
            {
                result = CaseMessages.CaseNotExist(nameCase);
            }

            return(String.IsNullOrEmpty(result)
                   ? new ProcessResult(SequeceMessages.CaseSequenceGenerated(nameCase, sequencers), true)
                   : new ProcessResult(result, false));
        }
Exemplo n.º 23
0
 public UserAppService(IUserQuery userQuery, IUserRepository userRepository)
 {
     _userQuery = userQuery;
     _userRepository = userRepository;
 }
Exemplo n.º 24
0
 public AccountController(IUserQuery userQuery)
 {
     _userQuery = userQuery;
 }
Exemplo n.º 25
0
 public UserController(IMediator mediator, IUserQuery userQuery)
 {
     _mediator  = mediator;
     _userQuery = userQuery;
 }
Exemplo n.º 26
0
 public UserService(IUserCommand userCommand, IUserQuery userQuery)
 {
     _userCommand = userCommand;
     _userQuery = userQuery;
 }
Exemplo n.º 27
0
 public UserController(IMediator mediator, IUserQuery userQuery, IHttpContextAccessor httpContextAccesor)
 {
     _mediator           = mediator;
     _userQuery          = userQuery;
     _httpContextAccesor = httpContextAccesor;
 }
Exemplo n.º 28
0
 public UsersController(IMediator mediator, IUserQuery query)
 {
     _mediator = mediator;
     _query    = query;
 }
Exemplo n.º 29
0
 public UserQueryController(IUserQuery UserQuery)
 {
     _UserQuery = UserQuery;
 }
Exemplo n.º 30
0
 public ListUserCmd(CommandUtil commandUtil, IUserQuery userQuery)
 {
     _commandUtil = commandUtil;
     _userQuery   = userQuery;
 }
Exemplo n.º 31
0
 public UserTests(IntegrationFixture fixture)
 {
     _mediator            = fixture.GetService <IMediator>();
     _userQuery           = fixture.GetService <IUserQuery>();
     _readModelRepository = fixture.GetService <IReadModelRepository>();
 }
 public UsersCollectionController(IUserQuery userQuery, IUserCommand userCommand)
 {
     _userQuery   = userQuery;
     _userCommand = userCommand;
 }
 public AuthenticationController(IUserQuery usersQuery)
 {
     this.usersQuery = usersQuery;
 }
Exemplo n.º 34
0
 public UsersController(IUserQuery repositoryQuery, IUserCommand repositoryCommand)
 {
     _repositoryQuery   = repositoryQuery;
     _repositoryCommand = repositoryCommand;
 }