예제 #1
0
 public GoodsController(ICommandService commandService,
                        StoreQueryService storeQueryService,
                        GoodsQueryService goodsQueryService)
 {
     _commandService    = commandService;
     _storeQueryService = storeQueryService;
     _goodsQueryService = goodsQueryService;
 }
        private WalletQueryService _walletQueryService; //钱包Q端


        public BenevolenceIndexController(ICommandService commandService,
                                          StoreQueryService storeQueryService,
                                          WalletQueryService walletQueryService
                                          )
        {
            _commandService     = commandService;
            _storeQueryService  = storeQueryService;
            _walletQueryService = walletQueryService;
        }
예제 #3
0
        private StoreQueryService _storeQueryService;           //商家

        public StatisticsController(ICommandService commandService,
                                    UserQueryService userQueryService,
                                    WalletQueryService walletQueryService,
                                    StoreOrderQueryService storeOrderQueryService,
                                    StoreQueryService storeQueryService)
        {
            _commandService         = commandService;
            _userQueryService       = userQueryService;
            _walletQueryService     = walletQueryService;
            _storeOrderQueryService = storeOrderQueryService;
            _storeQueryService      = storeQueryService;
        }
예제 #4
0
        private StoreQueryService _storeQueryService;   //商家

        /// <summary>
        /// IOC 构造函数注入
        /// </summary>
        /// <param name="commandService"></param>
        /// <param name="conferenceQueryService"></param>
        public UserController(ICommandService commandService,
                              UserQueryService userQueryService,
                              WalletQueryService walletQueryService,
                              CartQueryService cartQueryService,
                              StoreQueryService storeQueryService)
        {
            _commandService     = commandService;
            _userQueryService   = userQueryService;
            _walletQueryService = walletQueryService;
            _cartQueryService   = cartQueryService;
            _storeQueryService  = storeQueryService;
        }
예제 #5
0
        private ApiSession()
        {
            //需要配置信息

            //从IOC容器中获取queryservice实例
            var container = (ObjectContainer.Current as AutofacObjectContainer).Container;

            _userQueryService   = container.Resolve <UserQueryService>();
            _walletQueryService = container.Resolve <WalletQueryService>();
            _storeQueryService  = container.Resolve <StoreQueryService>();
            _cartQueryService   = container.Resolve <CartQueryService>();


            //缓存信息
            if (_cache == null)
            {
                _cache = CacheFactory.Build("RunTimeCache", settings =>
                {
                    settings.WithSystemRuntimeCacheHandle("inProcessCache")
                    .WithExpiration(ExpirationMode.Sliding, TimeSpan.FromSeconds(120));
                });
            }
        }