示例#1
0
        public GetCurrenciesQueryHandler(IUserCacheService cacheService, ICurrencyRepository currencyRepository, IMapper mapper)
            : base(cacheService)
        {
            _currencyRepository = currencyRepository;
            _mapper             = mapper;

            cacheService.SetAbsoluteExpiration(DateTimeOffset.Now.AddDays(5));
        }
        public GetUserInfoQueryHandler(IUserCacheService cacheService,
                                       IUserRepository userRepository,
                                       IMapper mapper)
            : base(cacheService)
        {
            _userRepository = userRepository;
            _mapper         = mapper;

            cacheService.SetAbsoluteExpiration(DateTimeOffset.Now.AddDays(3));
        }
        public GetAllGroupsQueryHandler(IUserCacheService cacheService,
                                        IGroupRepository groupRepository,
                                        IMapper mapper)
            : base(cacheService)
        {
            _groupRepository = groupRepository;
            _mapper          = mapper;

            cacheService.SetAbsoluteExpiration(DateTimeOffset.Now.AddDays(1));
        }
        public GetAssetQueryHandler(IUserCacheService cacheService,
                                    IAssetRepository assetRepository,
                                    IMapper mapper,
                                    IUserIdAccesor userIdAccesor)
            : base(cacheService)
        {
            _assetRepository = assetRepository;
            _mapper          = mapper;
            _userIdAccesor   = userIdAccesor;

            cacheService.SetAbsoluteExpiration(DateTimeOffset.Now.AddDays(1));
        }
        public GetTransactionsQueryHandler(IUserCacheService cacheService,
                                           ITransactionRepository transactionRepository,
                                           IAssetRepository assetRepository,
                                           IGroupRepository groupRepository,
                                           ICurrencyRepository currencyRepository,
                                           IMapper mapper)
            : base(cacheService)
        {
            _transactionRepository = transactionRepository;
            _assetRepository       = assetRepository;
            _groupRepository       = groupRepository;
            _currencyRepository    = currencyRepository;
            _mapper = mapper;

            cacheService.SetAbsoluteExpiration(DateTimeOffset.Now.AddDays(1));
        }